[Mono-list] Socket code.
George Farris
george@gmsys.com
Sat, 21 Feb 2004 16:31:00 -0800
I have some socket code that looks something like this:
byte[] bytes = new byte[1448];
do {
len = sock.Read(bytes, 0, (int)1448);
s = Encoding.ASCII.GetString(bytes);
buf.Append(s.Substring(0,len));
if (len < 1448)
break;
} while (len > 0);
The key thing is this used to work with a socket size of 1460, now it is
down to 1448. If I don't set the buffer size exactly then all the data
available is not read. Is there a property to get the packet size of a
socket?
--
George Farris <george@gmsys.com>