summary refs log tree commit diff stats
path: root/lib/pure/net.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure/net.nim')
-rw-r--r--lib/pure/net.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pure/net.nim b/lib/pure/net.nim
index d40f0949b..2461ece1b 100644
--- a/lib/pure/net.nim
+++ b/lib/pure/net.nim
@@ -347,7 +347,7 @@ type
 
   ETimeout* = object of ESynch
 
-proc newSocket(fd: TSocketHandle, isBuff: bool): PSocket =
+proc createSocket(fd: TSocketHandle, isBuff: bool): PSocket =
   assert fd != osInvalidSocket
   new(result)
   result.fd = fd
@@ -355,15 +355,15 @@ proc newSocket(fd: TSocketHandle, isBuff: bool): PSocket =
   if isBuff:
     result.currPos = 0
 
-proc socket*(domain: TDomain = AF_INET, typ: TType = SOCK_STREAM,
+proc newSocket*(domain: TDomain = AF_INET, typ: TType = SOCK_STREAM,
              protocol: TProtocol = IPPROTO_TCP, buffered = true): PSocket =
   ## Creates a new socket.
   ##
   ## If an error occurs EOS will be raised.
-  let fd = rawsockets.socket(domain, typ, protocol)
+  let fd = newRawSocket(domain, typ, protocol)
   if fd == osInvalidSocket:
     osError(osLastError())
-  result = newSocket(fd, buffered)
+  result = createSocket(fd, buffered)
 
 when defined(ssl):
   CRYPTO_malloc_init()