alexk
alexk

Reputation: 163

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

Upvotes: 1

Views: 1635

Answers (2)

Gonzalo
Gonzalo

Reputation: 21175

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.

Upvotes: 1

jpobst
jpobst

Reputation: 9982

If you use a synchronous socket, do things work as expected? That's a quick way to help narrow down the issue.

Upvotes: 0

Related Questions