This module provides an easy to use sockets-style nimrod interface to the OpenSSL library.
TSecureSocket* {.final.} = object
ssl: PSSL
bio: PBIO
-
proc connect*(sock: var TSecureSocket; address: string; port: int): Int
-
Connects to the specified address on the specified port. Returns the result of the certificate validation.
proc recvLine*(sock: TSecureSocket; line: var TaintedString): bool
-
Acts in a similar fashion to the recvLine in the sockets module. Returns false when no data is available to be read. Line must be initialized and not nil!
proc send*(sock: TSecureSocket; data: string)
-
Writes data to the socket.
proc close*(sock: TSecureSocket)
-
Closes the socket