
15 Dec
2009
15 Dec
'09
9:23 p.m.
Hello. I'm implementing a fully asynchronous server and I would like to know the order of async operations. The server receives, first of all, a size, and later the data. The onSizeRead handler allocates the memory required to store the data that is coming after the async_read. So I would like to know if this buffer will be available when onDataRead is called. so I get the size and data with two async_read operations. I would like to know if the relative order of the async calls is respected, since I'm reading from the same socket for both operations and I need the resources dictated by the first read before using the second one.