mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
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.
15 lines
593 B
Nim
15 lines
593 B
Nim
import nativesockets
|
|
export nativesockets
|
|
|
|
{.warning: "rawsockets module is deprecated, use nativesockets instead".}
|
|
|
|
template newRawSocket*(domain, sockType, protocol: cint): expr =
|
|
{.warning: "newRawSocket is deprecated, use newNativeSocket instead".}
|
|
newNativeSocket(domain, sockType, protocol)
|
|
|
|
template newRawSocket*(domain: Domain = AF_INET,
|
|
sockType: SockType = SOCK_STREAM,
|
|
protocol: Protocol = IPPROTO_TCP): expr =
|
|
{.warning: "newRawSocket is deprecated, use newNativeSocket instead".}
|
|
newNativeSocket(domain, sockType, protocol)
|