I am using async socket operations to read data streamed from a server. I need to use async because commands can be sent to the server and I will receive response messages in an async manner. My problem though is that sometimes in our production environment
the buffer that the Async operations write to isn't "ready" when I get a Completed event. That is; I read the BytesTransferred property on the SocketAsyncEventArgs object saying e.g. that 114 bytes was transferred, but the buffer is not updated with any
content (all zeros). Since the HW in production is a dual quad core processor with hyper threading I assumed that it might be related to the memory model. But even if the buffer is marked as volatile the same problem occurs.
The server is running Windows Server 2008 R2 Std Edition (x64) with 2xIntel Xeon E5520.
I hope you are able to put me on track here. I have done a lot of async server and client applications, but have never seen this issue before.
View Complete Post