ikskuh / zig-network

A smallest-common-subset of socket functions for crossplatform networking, TCP & UDP
MIT License
484 stars 59 forks source link

Fix "WSAEOPNOTSUPP" error in Socket.receiveFrom #46

Closed 360tetsu360 closed 2 years ago

360tetsu360 commented 2 years ago

Hi!

I was trying zig-network on Windows and found that when I called receiveFrom over UDP, I always got a WSAEOPNOTSUPPP error. The reason for this is that the lpFlags argument to WSARecvFrom and recvfrom is incorrect. I fixed it so that it works fine on Windows.

WSARecvFrom recvfrom