From b662d22ad181fae7fb0e9efc44fe3563406b236e Mon Sep 17 00:00:00 2001 From: Josh Girvin Date: Mon, 30 May 2016 16:29:38 +1000 Subject: Adding nimdoc comments as per PR comments As per @dom96 code review comments in PR #3488 --- lib/pure/net.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pure/net.nim b/lib/pure/net.nim index 8bc08c433..448323036 100644 --- a/lib/pure/net.nim +++ b/lib/pure/net.nim @@ -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: -- cgit 1.4.1-2-gfad0