[Mono-bugs] [Bug 60568][Wis] New - Async send not sending.
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 22 Jun 2004 11:28:14 -0400 (EDT)
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 walkers@surfmy.net.
http://bugzilla.ximian.com/show_bug.cgi?id=60568
--- shadow/60568 2004-06-22 11:28:14.000000000 -0400
+++ shadow/60568.tmp.22757 2004-06-22 11:28:14.000000000 -0400
@@ -0,0 +1,67 @@
+Bug#: 60568
+Product: Mono: Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: walkers@surfmy.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Async send not sending.
+
+Sending data from async client to server will fail after a few dozen sends.
+ I send data several times without issue then the server responds nicely. I
+send it even more times and then there are no callbacks issued.
+
+
+private void ClientSend(Socket client, String data)
+{
+Console.WriteLine("Sending data: " + data);
+byte[] byteData = Encoding.ASCII.GetBytes(data + "\r\n");
+
+client.BeginSend(byteData, 0, byteData.Length, 0,new
+AsyncCallback(ClientSendCallback), client);
+}
+
+private void ClientSendCallback(IAsyncResult ar)
+{
+Socket client = (Socket) ar.AsyncState;
+int bytesSent = client.EndSend(ar);
+Console.WriteLine("Sent {0} bytes to server.", bytesSent);
+}
+
+Actual Results:
+Sending data: TEST
+Sent 5 bytes to server.
+Sending data: TEST
+Sent 5 bytes to server.
+Sending data: TEST
+Sending data: TEST
+Sending data: TEST
+Sending data: TEST
+Sending data: TEST
+Sending data: TEST
+Sending data: TEST
+
+Expected Results:
+Sending data: TEST
+Sent 5 bytes to server.
+Sending data: TEST
+Sent 5 bytes to server.
+Sending data: TEST
+Sent 5 bytes to server.
+Sending data: TEST
+Sent 5 bytes to server.
+
+This exact binary works under Windows. Drop it on the Linux box and this is
+the result.
+Mono version: 0.96
+Linux kernel: 2.4.22
+Distro: Gentoo