[Mono-list] Socket code.
Gonzalo Paniagua Javier
gonzalo@ximian.com
Sun, 22 Feb 2004 03:23:11 +0100
El dom, 22-02-2004 a las 01:31, George Farris escribió:
> 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?
If this doesn't work, it's a bug. Please file a bug report in bugzilla
and attach a simple test case to reproduce the problem.
Thanks.
-Gonzalo