Named Pipes 2-way commication
-
If I open one named pipe and want to communicate both ways between client and server, how do keep the client from reading data it just wrote to the pipe? Or is the data only transfered in one direction, that that the client cannot end up reading the data it writes? For example: Client writes a string, then assume the server reads the string, so it checks the pipes for a response, then ends up reading the string it just wrote to the pipe.
-
If I open one named pipe and want to communicate both ways between client and server, how do keep the client from reading data it just wrote to the pipe? Or is the data only transfered in one direction, that that the client cannot end up reading the data it writes? For example: Client writes a string, then assume the server reads the string, so it checks the pipes for a response, then ends up reading the string it just wrote to the pipe.
AFAIK it is like two uni-directional pipes, similar to a serial port communication. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
If I open one named pipe and want to communicate both ways between client and server, how do keep the client from reading data it just wrote to the pipe? Or is the data only transfered in one direction, that that the client cannot end up reading the data it writes? For example: Client writes a string, then assume the server reads the string, so it checks the pipes for a response, then ends up reading the string it just wrote to the pipe.
The situation cannot happen. One "end's" writes are the other "end's" reads.
-
If I open one named pipe and want to communicate both ways between client and server, how do keep the client from reading data it just wrote to the pipe? Or is the data only transfered in one direction, that that the client cannot end up reading the data it writes? For example: Client writes a string, then assume the server reads the string, so it checks the pipes for a response, then ends up reading the string it just wrote to the pipe.
CreateNamedPipe api used to create namedpipes provide you with option duples,inbound or outbound
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You
-
If I open one named pipe and want to communicate both ways between client and server, how do keep the client from reading data it just wrote to the pipe? Or is the data only transfered in one direction, that that the client cannot end up reading the data it writes? For example: Client writes a string, then assume the server reads the string, so it checks the pipes for a response, then ends up reading the string it just wrote to the pipe.
dene99970 wrote:
Client writes a string, then assume the server reads the string, so it checks the pipes for a response, then ends up reading the string it just wrote to the pipe.
This should never happen, as previously pointed out. There is a probably a bug in your source code or the "server" echos back received text, can you show example code? /M