Re: Named Pipes in C++
- From: Ralf Fassel <ralfixx@xxxxxx>
- Date: Tue, 14 Feb 2006 16:16:19 +0100
* Steven Brown <riaqnvm7@xxxxxxxxxxx>
| It then says (9 times over) the pipe has been cleared, is still
| open, and that the input string has "xxxxx" in it.
Same here. If I add the diagnostics, I see that after each input
operation which has nothing to read that the stream state is again
EOF. I guess this is just as it is with named pipes.
If I close the stream, reset it and reopen it, the program works as
you intend it to do.
for(;;) {
if (!(pin >> input)) {
pin.close();
pin.clear();
pin.open("testPipe.pipe");
} else {
cout << "You just typed: " << input << endl;
}
}
Again, I'm not expert on this, so my advice would be `do it exactly as
in the example code -- or become an expert yourself' ;-)
HTH
R'
.
- References:
- Re: Named Pipes in C++
- From: Ralf Fassel
- Re: Named Pipes in C++
- From: Ralf Fassel
- Re: Named Pipes in C++
- Prev by Date: Re: XWindows Question - Quick one
- Next by Date: Re: No XMMS volume control after a soundcard update on SuSE 10
- Previous by thread: Re: Named Pipes in C++
- Next by thread: taking snapshot of window and printing
- Index(es):
Relevant Pages
|