Asynchronous socket callbacks do not work in Mono/Linux
I'm exploring porting a .NET C# application from Windows to Linux using Mono. 开发者_运维知识库The problem I'm stuck with is that asynchronous TCP socket calls do not work. This means that I can send data with no problems but I'm only seem to be able to receive the very first response from the socket (via Socket.BeginReceive()). The next BeginReceive() puts the thread into a wait state.
In it possible in principle that our socket code contains a bug but as it's been working flawlessly in Windows for years.
Thank you
This works fine with the mono-2-10 branch (soon to be released as Mono 2.10) and master.
The Mono 2.6.7 shipped with ubuntu fails and so does Mono 2.8. I've found the problem and I am testing a fix.. The next releases in the 2.6.x series will have the fix (also 2.8.x if there's any, since we are moving to 2.10 in a few days).
Btw, you should report problems in Mono following http://mono-project.com/Bugs instead of here.
If you use a synchronous socket, do things work as expected? That's a quick way to help narrow down the issue.
精彩评论