Rename rawsockets module to nativesockets
This change was done to avoid confusion with TCP/IP raw sockets. Native sockets module represents handling native system low level socket API in general and is not just limited anyhow to TCP/IP raw sockets. A stub lib/deprecated/pure/rawsockets.nim module has been added as compatibility layer for old code using rawsockets, so this change will not break existing code.
This commit is contained in:
parent
3fe5731777
commit
be991ed413
16 changed files with 91 additions and 65 deletions
|
|
@ -56,7 +56,7 @@
|
|||
##
|
||||
|
||||
import asyncdispatch
|
||||
import rawsockets
|
||||
import nativesockets
|
||||
import net
|
||||
import os
|
||||
|
||||
|
|
@ -112,8 +112,8 @@ proc newAsyncSocket*(domain: Domain = AF_INET, sockType: SockType = SOCK_STREAM,
|
|||
##
|
||||
## This procedure will also create a brand new file descriptor for
|
||||
## this socket.
|
||||
result = newAsyncSocket(newAsyncRawSocket(domain, sockType, protocol), domain,
|
||||
sockType, protocol, buffered)
|
||||
result = newAsyncSocket(newAsyncNativeSocket(domain, sockType, protocol),
|
||||
domain, sockType, protocol, buffered)
|
||||
|
||||
proc newAsyncSocket*(domain, sockType, protocol: cint,
|
||||
buffered = true): AsyncSocket =
|
||||
|
|
@ -121,8 +121,9 @@ proc newAsyncSocket*(domain, sockType, protocol: cint,
|
|||
##
|
||||
## This procedure will also create a brand new file descriptor for
|
||||
## this socket.
|
||||
result = newAsyncSocket(newAsyncRawSocket(domain, sockType, protocol),
|
||||
Domain(domain), SockType(sockType), Protocol(protocol), buffered)
|
||||
result = newAsyncSocket(newAsyncNativeSocket(domain, sockType, protocol),
|
||||
Domain(domain), SockType(sockType),
|
||||
Protocol(protocol), buffered)
|
||||
|
||||
when defined(ssl):
|
||||
proc getSslError(handle: SslPtr, err: cint): cint =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue