Many renames. Created high level asyncnet module.
This commit is contained in:
parent
2ce9f1c77f
commit
192e11e7b7
4 changed files with 175 additions and 12 deletions
|
|
@ -10,7 +10,7 @@
|
|||
## This module implements a high-level cross-platform sockets interface.
|
||||
|
||||
{.deadCodeElim: on.}
|
||||
import sockets2, os, strutils, unsigned, parseutils, times
|
||||
import rawsockets, os, strutils, unsigned, parseutils, times
|
||||
|
||||
type
|
||||
IpAddressFamily* {.pure.} = enum ## Describes the type of an IP address
|
||||
|
|
@ -360,7 +360,7 @@ proc socket*(domain: TDomain = AF_INET, typ: TType = SOCK_STREAM,
|
|||
## Creates a new socket.
|
||||
##
|
||||
## If an error occurs EOS will be raised.
|
||||
let fd = sockets2.socket(domain, typ, protocol)
|
||||
let fd = rawsockets.socket(domain, typ, protocol)
|
||||
if fd == osInvalidSocket:
|
||||
osError(osLastError())
|
||||
result = newSocket(fd, buffered)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue