Hi all,
I have been looking to implement a custom class of :
IList<ArraySegment<byte>>
this will be passed to a socket, and used as the buffer to receive data from that Socket.
Socket.BeginReceive(
IList<ArraySegment<Byte>>, SocketFlags, AsyncCallback, Object
)
MSDN Documentation
While testing I have found that when calli...
In what order is the Socket.BeginReceive/EndReceive functions called?
For instance, I call BeginReceive twice, once to get the message length and the second time to get the message itself. Now the scenario is like that, for every message I send, I start waiting for its completion (actually acknowledgment of the message sent, also I wait...
All the asynchronous calls to HttpWebRequest.BeginGetResponse/EndGetResponse and HttpWebResponse.GetResponseStream().BeginRead/EndRead are made from try/catch blocks, however, these exceptions propagate and do not leave a chance handle them and stop application termination:
Unhandled Exception: System.IO.IOException: Unable to read d...
I have a doubt about socket programming. I am developing a TCP packet sniffer. I am using Socket.BeginAccept, Socket.BeginReceive to capture every packet, but when a packet is received I have to process something. It is a fast operation, but would take some milliseconds, and then call BeginReceive again.
My question is, what would happ...
I'm using a NetworkStream & TcpClient to asynchronously receive data using BeginRead. I need to apply a time-out to this operation, such that after a specified amount of time the read will be aborted.
As far as I'm able to tell, this isn't supported on NetworkStream or TcpClient - there is a ReceiveTimeout property, but this appears to...