Board index » cppbuilder » CreateNamedPipe woes

CreateNamedPipe woes


2005-02-28 06:34:30 AM
cppbuilder81
Hello out there,
does anybody know of a sample program (rather 'a pair of programs')
where one (the server) creates a named pipe, another (the client)
connects to it and they communicate happily ever after?
I created an example based on the help item for 'Multithreaded Server'
(Win32 help) and during development (that is: having break points set)
I got the server to work.
However, if I let the server run without break points and without any
debug output it hangs. Very infuriating.
If necessary I can of course post all the necessary code, but if
somebody knows of a working example this might be a quicker way.
Any links will be greatly appreciated
Helmut Giese
 
 

Re:CreateNamedPipe woes

"Helmut Giese" < XXXX@XXXXX.COM >wrote in message
Quote
However, if I let the server run without break points
and without any debug output it hangs. Very infuriating.
Please show your actual code. Chances are, you are not managing the
communications properly. The biggest annoyance with named pipes is that you
cannot have the client and server both reading from the pipe, or both
writing to the pipe, at the same time. When one is writing, the other has
to be reading, and vice versa.
Gambit
 

Re:CreateNamedPipe woes

On Sun, 27 Feb 2005 14:54:24 -0800, "Remy Lebeau \(TeamB\)"
< XXXX@XXXXX.COM >wrote:
Quote

"Helmut Giese" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...

>However, if I let the server run without break points
>and without any debug output it hangs. Very infuriating.

Please show your actual code. Chances are, you are not managing the
communications properly. The biggest annoyance with named pipes is that you
cannot have the client and server both reading from the pipe, or both
writing to the pipe, at the same time. When one is writing, the other has
to be reading, and vice versa.
Hi Gambit,
I dropped the multithreading aspect from the example since I don't
really need it currently, and the basic stuff seems to work now. I'll
be back as soon as new problems arise :)
Thanks
Helmut Giese
 

{smallsort}