Adding nimdoc comments as per PR comments
As per @dom96 code review comments in PR #3488
This commit is contained in:
parent
da308be2d7
commit
b662d22ad1
1 changed files with 3 additions and 1 deletions
|
|
@ -583,7 +583,7 @@ proc connect*(socket: Socket, address: string,
|
|||
let ret = SSLConnect(socket.sslHandle)
|
||||
socketError(socket, ret)
|
||||
|
||||
when defined(posix):
|
||||
when defined(posix) or defined(nimdoc):
|
||||
proc makeUnixAddr(path: string): Sockaddr_un =
|
||||
result.sun_family = AF_UNIX.toInt
|
||||
if path.len >= Sockaddr_un_path_length:
|
||||
|
|
@ -592,6 +592,7 @@ when defined(posix):
|
|||
|
||||
proc connectUnix*(socket: Socket, path: string) =
|
||||
## Connects to Unix socket on `path`.
|
||||
## This only works on Unix-style systems: Mac OS X, BSD and Linux
|
||||
var socketAddr = makeUnixAddr(path)
|
||||
if socket.fd.connect(cast[ptr SockAddr](addr socketAddr),
|
||||
sizeof(socketAddr).Socklen) != 0'i32:
|
||||
|
|
@ -599,6 +600,7 @@ when defined(posix):
|
|||
|
||||
proc bindUnix*(socket: Socket, path: string) =
|
||||
## Binds Unix socket to `path`.
|
||||
## This only works on Unix-style systems: Mac OS X, BSD and Linux
|
||||
var socketAddr = makeUnixAddr(path)
|
||||
if socket.fd.bindAddr(cast[ptr SockAddr](addr socketAddr),
|
||||
sizeof(socketAddr).Socklen) != 0'i32:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue