sockets compile again with SSL support

This commit is contained in:
Araq 2012-07-10 00:16:04 +02:00
commit a6ee0eb299
2 changed files with 5 additions and 6 deletions

View file

@ -1021,7 +1021,7 @@ proc recvAsync*(socket: TSocket, s: var TaintedString): bool =
when defined(ssl):
if socket.isSSL:
if bytesRead <= 0:
var ret = SSLGetError(socket.sslHandle, bytesRead)
var ret = SSLGetError(socket.sslHandle, bytesRead.cint)
case ret
of SSL_ERROR_ZERO_RETURN:
SSLError("TLS/SSL connection failed to initiate, socket closed prematurely.")
@ -1088,7 +1088,7 @@ proc sendAsync*(socket: TSocket, data: string): bool =
when defined(ssl):
if socket.isSSL:
if bytesSent <= 0:
let ret = SSLGetError(socket.sslHandle, bytesSent)
let ret = SSLGetError(socket.sslHandle, bytesSent.cint)
case ret
of SSL_ERROR_ZERO_RETURN:
SSLError("TLS/SSL connection failed to initiate, socket closed prematurely.")