socket function winsock
Creates a socket that is bound to a specific transport service provider.
To learn more, see learn.microsoft.com/windows/win32/api/winsock2/nf-winsock2-socket.
Implementation
Win32Result<SOCKET> socket(int af, WINSOCK_SOCKET_TYPE type, int protocol) {
resolveGetLastError();
final result_ = _socket(af, type, protocol);
return .new(value: .new(result_), error: GetLastError());
}