Named pipe questions

Named pipe questions

Post by Neil Weich » Sat, 23 Aug 1997 04:00:00



I am having the devil of a time with a duplex, overlapped,
asynchronous named pipe.  I am using WaitForMultipleObjects to detect
events on the pipe.  One thing I am not clear on is what causes an
event to be set in connection with the pipe.  If it is a message-pipe,
what consititutes a message ?  (The buffer size in CreateNamedPipe are
documented as "suggestions").  If it is a byte-mode pipe, how many
bytes have to be received before the event is set?  How can I tell the
difference between an event being set by bytes coming in versus a
completed write?  What will happen if I disconnect a pipe before the
overlapped write is complete?  Does the light in the refrigerator stay
on when you close the door?

Any pointers on this would be greatly appreciated.

Thanks.

Neil Weicher

 
 
 

Named pipe questions

Post by Felix Kasza [MV » Sat, 30 Aug 1997 04:00:00


Neil,

Didn't I reply to this before? <shrug>

 > If it is a message-pipe, what consititutes a message ?

A single WriteFile() operation at the other end.

 > If it is a byte-mode pipe, how many bytes have to be
 > received before the event is set?

One.

 > How can I tell the difference between an event being
 > set by bytes coming in versus a completed write?

On which type? The event is set when a synchronous read would normally
complete: in byte-read mode, when between one and <max> bytes have
been read, in message-read mode when one message has been read (or its
first part, if the supplied buffer is too small).

Cheers,
Felix.

--
If you post a reply, kindly refrain from emailing it, too.

 
 
 

1. IPC and Named Pipe Question

I have two win2k processes which need to communicate.  The processes may run
together on the same machine, in the case where network is not available, or
on separate machines, where network is available.  One case is that no
network, not even loopback functionality is available.  Is there an IPC
mechanism that will handle both cases?  I know shared memory would be an
option for the case where network is not available, but will not work across
network.  Will Named Pipes work in the case of no network hardware, or do
they rely on underlying network protocol to work?  Am I doomed to
use/maintain two mechanisms? Share Memory in one case and another IPC in the
other?

CB

2. making sendmail.cf

3. Named Pipe questions

4. Piracy survey

5. Named Pipe Question

6. Psiwin 1.1 - Psion Print problem (Windows printer)

7. Named Pipes Question

8. Compaq Presario

9. Named pipes question!

10. Help with named pipe reconnect losing TX of the pipe, RX still works

11. Named Pipes and overlapping IO question

12. Question: transport layer of named pipe?

13. Named Pipe Security Questions...