Windows HANDLE and sockets / named pipes

2009-06-18 Thread brodie
Hi all, Has anyone done any work to create a stream implementation for async use? In particular, Windows async sockets or async named pipes? I'm planning to implement PB as the messaging layer on top of a Windows sockets transport layer (therefore using HANDLE instead of a file descripter). We

Re: Windows HANDLE and sockets / named pipes

2009-06-18 Thread xiliu tang
2009/6/19 brodie brofi...@gmail.com Hi all, Has anyone done any work to create a stream implementation for async use? In particular, Windows async sockets or async named pipes? I'm planning to implement PB as the messaging layer on top of a Windows sockets transport layer (therefore using

Re: Windows HANDLE and sockets / named pipes

2009-06-18 Thread Kenton Varda
Note that the protocol buffer parser is not asynchronous. That means you either need to feed it an entire message at once, or it will need to block waiting for mode data to arrive on the input stream. So if you want to do something asynchronous, you best bet is probably to do your own buffering

Re: Windows HANDLE and sockets / named pipes

2009-06-18 Thread Kenton Varda
On Thu, Jun 18, 2009 at 8:47 PM, Kenton Varda ken...@google.com wrote: Note that the protocol buffer parser is not asynchronous. That means you either need to feed it an entire message at once, or it will need to block waiting for mode data to arrive on s/mode/more the input stream. So

Re: Use of repeated

2009-06-18 Thread Kenton Varda
On Thu, Jun 18, 2009 at 8:44 PM, Sushil Shelly skshe...@gmail.com wrote: Some suggestions. - Attempting to write to a non-existing element should throw and exception, - Attempting to read from a non-existing element should also throw an exception At Google we've made the