Embedded Network patches - eventfd & socket getters (#19632)

This commit is contained in:
Jaremy Creechley 2022-03-28 03:37:59 -07:00 • committed by GitHub
commit eae29e8eaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 9 deletions

View file

@ -1798,6 +1798,16 @@ proc isSsl*(socket: Socket): bool =
proc getFd*(socket: Socket): SocketHandle = return socket.fd
## Returns the socket's file descriptor
when defined(zephyr) or defined(nimNetSocketExtras): # Remove in future
proc getDomain*(socket: Socket): Domain = return socket.domain
## Returns the socket's domain
proc getType*(socket: Socket): SockType = return socket.sockType
## Returns the socket's type
proc getProtocol*(socket: Socket): Protocol = return socket.protocol
## Returns the socket's protocol
when defined(nimHasStyleChecks):
{.push styleChecks: off.}