summary refs log tree commit diff stats
path: root/lib/pure/asyncnet.nim
diff options
context:
space:
mode:
authorArdek Romak <ardek66@tutanota.com>2021-05-07 01:02:37 +0300
committerGitHub <noreply@github.com>2021-05-06 15:02:37 -0700
commit9d86639a0b65acdc7842ef66ad8d2f97a992e4b8 (patch)
tree9021f425ac017aa3a92277514fdd5152f8f6fd88 /lib/pure/asyncnet.nim
parent9b126de65cdb6c8b59e0eb58763ca2878f456e0d (diff)
downloadNim-9d86639a0b65acdc7842ef66ad8d2f97a992e4b8.tar.gz
Export sslHandle in `net` and `asyncnet`. (#17573)
Diffstat (limited to 'lib/pure/asyncnet.nim')
-rw-r--r--lib/pure/asyncnet.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/pure/asyncnet.nim b/lib/pure/asyncnet.nim
index 7ef40a128..5523fa10e 100644
--- a/lib/pure/asyncnet.nim
+++ b/lib/pure/asyncnet.nim
@@ -736,6 +736,11 @@ proc close*(socket: AsyncSocket) =
         raiseSSLError()
 
 when defineSsl:
+  proc sslHandle*(self: AsyncSocket): SslPtr =
+    ## Retrieve the ssl pointer of `socket`.
+    ## Useful for interfacing with `openssl`.
+    self.sslHandle
+  
   proc wrapSocket*(ctx: SslContext, socket: AsyncSocket) =
     ## Wraps a socket in an SSL context. This function effectively turns
     ## `socket` into an SSL socket.