Added an asyncio.isSendDataBuffered procedure.
This commit is contained in:
parent
ff1d68c50b
commit
a1e823b038
1 changed files with 4 additions and 0 deletions
|
|
@ -423,6 +423,10 @@ proc isConnecting*(s: PAsyncSocket): bool =
|
|||
proc isClosed*(s: PAsyncSocket): bool =
|
||||
## Determines whether ``s`` has been closed.
|
||||
return s.info == SockClosed
|
||||
proc isSendDataBuffered*(s: PAsyncSocket): bool =
|
||||
## Determines whether ``s`` has data waiting to be sent, i.e. whether this
|
||||
## socket's sendBuffer contains data.
|
||||
return s.sendBuffer.len != 0
|
||||
|
||||
proc setHandleWrite*(s: PAsyncSocket,
|
||||
handleWrite: proc (s: PAsyncSocket) {.closure.}) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue