recvfrom function winsock
Receives a datagram and stores the source address.
To learn more, see learn.microsoft.com/windows/win32/api/winsock/nf-winsock-recvfrom.
Implementation
Win32Result<int> recvfrom(
SOCKET s,
PSTR buf,
int len,
int flags,
Pointer<SOCKADDR>? from,
Pointer<Int32>? fromlen,
) {
final result_ = recvfrom_Wrapper(
s,
buf,
len,
flags,
from ?? nullptr,
fromlen ?? nullptr,
);
return .new(value: result_.value.i32, error: result_.error);
}