mirror of https://github.com/vacp2p/nim-ngtcp2.git
14 lines
350 B
Nim
14 lines
350 B
Nim
# Import socket definitions from system
|
|
|
|
when defined(windows):
|
|
{.passL: "-lws2_32".}
|
|
const socketheader = "<winsock2.h>"
|
|
else:
|
|
const socketheader = "<sys/socket.h>"
|
|
|
|
type
|
|
sockaddr*
|
|
{.header: socketheader, importc: "struct sockaddr".} = object
|
|
sockaddr_storage*
|
|
{.header: socketheader, importc: "struct sockaddr_storage".} = object
|