Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
I'm having a problem with asynchronous socket calls...
BeginReceive never has its callback called. Using the following code:
socket.BeginReceive(context.Buffer, 0, context.Buffer.Length, SocketFlags.None, out error, DoReceive, context);
The callback DoReceive is never called. The error is output as 'Success'.
Manually calling socket.Receive(context.Buffer) results in correct data.
I've tested this on windows mono build version 2.10, 2.10.8 and linux centos mono build version 2.10.2 and all have the same result.
When run on .NET built for windows, there is no such problem.
I am sure that if I try this it will work because I will not be testing *exactly* the same code that you tested. Please, attach a self-contained test case that helps us reproduce the problem.
I get an error for both projects: error CS2001: Source file `TcpServer.cs' could not be found
Ideally, you should try to extract a smaller test case. Just as you don't want to debug mono, I don't want to debug your code ;-). Are you familiar with tcpdump/wireshark? It would also help to get the output of that. Perhaps there is no actual data available to read and that's why the callback in BeginReceive() is never called.
Sorry, the solution you need to build is here:
I've just retested and it compiles from fresh fine in VS2010.
Did you try the tests I suggested on the binaries which are indeed inside that zip file? They demonstrate the problem and show that it is not data related.
you need to be in directory CSServer/bin/Debug/ before you run mono because it requires a dll which is located there.
I also had this problem (I was using the Alchemy Websockets code) with Windows and 2.10.8. I fought with this all day, the callback of the beginReceive was never getting called. It worked just find using .Net instead of Mono.
I upgraded to the 2.11.4 Alpha and now the callback is being called.
We have not received the requested information. If you are still experiencing this issue please provide all the requested information and reopen the bug report.