Question Linux: Socket.BeginReceiveFrom: Seems not working on Linux ... it doesnt Do anything

LipkeGu

Member
Joined
Jul 1, 2025
Messages
5
Programming Experience
5-10
Hi,

Im working currently on a project which is running fine on Windows (Compiling and receiving / sending datagrams via UDP).
On Linux the Function Socket.BeginReceiveFrom doesnt Do anything... it seems Async Sockets are not supported on linux. :(
If anyone has a solution for this problem, it would be nice to know about that. I can track it down to this Line: BaseSocket.cs
 
Yikes? So you just check-in code into the main branch without testing first?
 
I tested it and it does also not work.
It is exactly this line where the problem is:
C#:
Expand Collapse Copy
                    var socketTask = await socket.ReceiveFromAsync(buffer, new IPEndPoint(IPAddress.Any, 0));

:(
C#:
Expand Collapse Copy
➜  net8.0 git:(master) ✗ sudo ./Netboot
NetBoot 1.0 (LE (LittleEndian))
[I] Host Platform: Linux
[I] Added Service for 'NONE'
[I] Added Service for 'TFTP'
[I] Added Service for 'DHCP'
[I] Added Service for 'BINL'
[I] DHCP: Bootserver behavior set to: WindowsDeploymentServer
[D] BaseSocket: Listening...
[D] BaseSocket: Listening...
[D] BaseSocket: Listening...
 
You'll need to be more descriptive than "it doesn't work." What error or behavior are you getting?

My recommendation is to start a minimal project to make it easier to reproduce the problem. Basically a simple console app as the server that just awaits a packet, and a simple console app that sends the packet. Put lots of tracing in both chunks of code. The open an issue in GitHub.
 
Back
Top Bottom