mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
* 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>
19 lines
531 B
C
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; |