[Mono-bugs] [Bug 75705][Blo] Changed - Receive on closed socket behaviour different between windows and linux.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed May 9 17:00:24 EDT 2007

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by latexer at gentoo.org.


--- shadow/75705	2007-05-09 16:57:00.000000000 -0400
+++ shadow/75705.tmp.5765	2007-05-09 17:00:24.000000000 -0400
@@ -156,6 +156,28 @@
 ------- Additional Comments From latexer at gentoo.org  2007-05-09 16:57 -------
 Created an attachment (id=19208)
 Simple client which triggers the bug
+------- Additional Comments From latexer at gentoo.org  2007-05-09 17:00 -------
+Ok, there's the simple test case that triggers it. In particular we
+have a server that, when receiving a connection, sends 0x00, then
+sends another 0x00.
+The client is expecting to receive a single byte with the length of
+data that is supposed to follow, so it calls "client.GetStream
+().ReadByte();", then calls client.GetStream ().Read trying to read
+however long the results of the first call was.
+In our particular case, the server is sending 0x00, so the client does
+a call to NetworkStream.Read with a zero length byte area, a 0 start,
+and a 0 stop.
+If the server hasn't sent more bytes yet, this succeeds. If there's
+data to read, though, latest SVN head throws the interrupted
+exception. Both and MS .NET succeed for this case as well.
+Does that make sense?

More information about the mono-bugs mailing list