summary refs log tree commit diff stats
path: root/lib/pure/asyncio.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure/asyncio.nim')
-rw-r--r--lib/pure/asyncio.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pure/asyncio.nim b/lib/pure/asyncio.nim
index 88e3e848f..403401ff1 100644
--- a/lib/pure/asyncio.nim
+++ b/lib/pure/asyncio.nim
@@ -420,6 +420,9 @@ proc isListening*(s: PAsyncSocket): bool =
 proc isConnecting*(s: PAsyncSocket): bool =
   ## Determines whether ``s`` is connecting.  
   return s.info == SockConnecting
+proc isClosed*(s: PAsyncSocket): bool =
+  ## Determines whether ``s`` has been closed.
+  return s.info == SockClosed
 
 proc setHandleWrite*(s: PAsyncSocket,
     handleWrite: proc (s: PAsyncSocket) {.closure.}) =