getprotobyname function winsock
Retrieves the protocol information corresponding to a protocol name.
To learn more, see learn.microsoft.com/windows/win32/api/winsock/nf-winsock-getprotobyname.
Implementation
Win32Result<Pointer<PROTOENT>> getprotobyname(PCSTR name) {
resolveGetLastError();
final result_ = _getprotobyname(name);
return .new(value: result_, error: GetLastError());
}