Files
c3c/lib/std/net/os/linux.c3
Pierre Curto 89e084938f cross platform socket interface (#857)
* lib/std/net: add Network, Socket and Listener

Signed-off-by: Pierre Curto <pierre.curto@gmail.com>

* lib/std/net: add SocketOption

Signed-off-by: Pierre Curto <pierre.curto@gmail.com>

* lib/std/net: fixes for win32 and wasm

Signed-off-by: Pierre Curto <pierre.curto@gmail.com>

---------

Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
2023-07-16 14:14:36 +02:00

19 lines
531 B
C

module std::net::os @if(env::LINUX);
import libc;
const int PLATFORM_AF_AX25 = 3;
const int PLATFORM_AF_IPX = 4;
const int PLATFORM_AF_APPLETALK = 5;
const int PLATFORM_AF_NETROM = 6;
const int PLATFORM_AF_BRIDGE = 7;
const int PLATFORM_AF_AAL5 = 8;
const int PLATFORM_AF_X25 = 9;
const PLATFORM_O_NONBLOCK = 0o4000;
// https://git.sr.ht/~sircmpwn/hare/tree/master/item/rt/+linux/socket.ha
const int SOL_SOCKET = 1;
const int SO_REUSEADDR = 2;
const int SO_BROADCAST = 6;
const int SO_KEEPALIVE = 9;
const int SO_REUSEPORT = 15;