rawsockets.nim 599 B

123456789101112131415
  1. import nativesockets
  2. export nativesockets
  3. {.warning: "rawsockets module is deprecated, use nativesockets instead".}
  4. template newRawSocket*(domain, sockType, protocol: cint): untyped =
  5. {.warning: "newRawSocket is deprecated, use newNativeSocket instead".}
  6. newNativeSocket(domain, sockType, protocol)
  7. template newRawSocket*(domain: Domain = AF_INET,
  8. sockType: SockType = SOCK_STREAM,
  9. protocol: Protocol = IPPROTO_TCP): untyped =
  10. {.warning: "newRawSocket is deprecated, use newNativeSocket instead".}
  11. newNativeSocket(domain, sockType, protocol)