M
Matthew Geyer
been using asynchronous sockets with AsyncCallback and
System.Net.Sockets as per the excellent MSDN example.
everything has been working great, except when i want to receive more
total bytes than my buffer can hold.
i open a connection with an 8k buffer on the socket. if the server
sends me 5k and closes connection it works fine. if the server sends me
10k, my BeginReceive callback (which does loop) gives me 8k of the data,
after which EndReceive returns 0 and so i close my socket.
however, if i set the buffer to 32k i can get all the data.
is it supposed to work like that?
System.Net.Sockets as per the excellent MSDN example.
everything has been working great, except when i want to receive more
total bytes than my buffer can hold.
i open a connection with an 8k buffer on the socket. if the server
sends me 5k and closes connection it works fine. if the server sends me
10k, my BeginReceive callback (which does loop) gives me 8k of the data,
after which EndReceive returns 0 and so i close my socket.
however, if i set the buffer to 32k i can get all the data.
is it supposed to work like that?