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) {
final result_ = socket_Wrapper(af, type, protocol);
return .new(value: .new(result_.value.i64), error: result_.error);
}