Added a TSocketHandle type to winlean.nim and posix.nim
Edited sockets.nim and asyncio.nim to use the new TSocketHandle type.
This commit is contained in:
parent
b753edec1d
commit
229d83f6c6
4 changed files with 30 additions and 27 deletions
|
|
@ -89,13 +89,13 @@ import sockets, os
|
|||
## getSocket(s).accept(client)
|
||||
|
||||
when defined(windows):
|
||||
from winlean import TTimeVal, TFdSet, FD_ZERO, FD_SET, FD_ISSET, select
|
||||
from winlean import TTimeVal, TSocketHandle, TFdSet, FD_ZERO, FD_SET, FD_ISSET, select
|
||||
else:
|
||||
from posix import TTimeVal, TFdSet, FD_ZERO, FD_SET, FD_ISSET, select
|
||||
from posix import TTimeVal, TSocketHandle, TFdSet, FD_ZERO, FD_SET, FD_ISSET, select
|
||||
|
||||
type
|
||||
TDelegate* = object
|
||||
fd*: cint
|
||||
fd*: TSocketHandle
|
||||
deleVal*: PObject
|
||||
|
||||
handleRead*: proc (h: PObject) {.nimcall.}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue