summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-11-20 22:04:45 +0100
committerAraq <rumpf_a@web.de>2012-11-20 22:04:45 +0100
commit1dfc57c5fffc425ffe9c79551463de8a386f8697 (patch)
treed40a2b2d4122657fa78356fa6bd76f1720d12e22
parent67d9933eb3da1902e2430e10499def11b98afe23 (diff)
downloadNim-1dfc57c5fffc425ffe9c79551463de8a386f8697.tar.gz
bugfix: sockets with SSL support
-rwxr-xr-xlib/pure/sockets.nim9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/pure/sockets.nim b/lib/pure/sockets.nim
index c7b609856..041e00872 100755
--- a/lib/pure/sockets.nim
+++ b/lib/pure/sockets.nim
@@ -473,7 +473,9 @@ proc acceptAddr*(server: TSocket, client: var TSocket, address: var string) {.
             else:
               SSLError("Unknown error")
 
-proc setBlocking*(s: TSocket, blocking: bool)
+proc setBlocking*(s: TSocket, blocking: bool) {.tags: [].}
+  ## sets blocking mode on socket
+
 when defined(ssl):
   proc acceptAddrSSL*(server: TSocket, client: var TSocket,
                       address: var string): TSSLAcceptResult {.
@@ -762,7 +764,7 @@ proc connectAsync*(socket: TSocket, name: string, port = TPort(0),
       socket.sslNoHandshake = true
 
 when defined(ssl):
-  proc handshake*(socket: TSocket): bool {.tags: [FReadIO, RWriteIO].} =
+  proc handshake*(socket: TSocket): bool {.tags: [FReadIO, FWriteIO].} =
     ## This proc needs to be called on a socket after it connects. This is
     ## only applicable when using ``connectAsync``.
     ## This proc performs the SSL handshake.
@@ -1394,8 +1396,7 @@ when defined(Windows):
                    argptr: ptr clong): cint {.
                    stdcall, importc:"ioctlsocket", dynlib: "ws2_32.dll".}
 
-proc setBlocking*(s: TSocket, blocking: bool) =
-  ## sets blocking mode on socket
+proc setBlocking(s: TSocket, blocking: bool) =
   when defined(Windows):
     var mode = clong(ord(not blocking)) # 1 for non-blocking, 0 for blocking
     if SOCKET_ERROR == ioctlsocket(TWinSocket(s.fd), FIONBIO, addr(mode)):