mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Refactor protocols.
This commit is contained in:
committed by
Christoffer Lerno
parent
f3e3aa231d
commit
99cfaa1583
@@ -1,15 +1,15 @@
|
||||
module std::net::os;
|
||||
const bool SUPPORTS_INET = env::LIBC && (env::WIN32 || env::DARWIN || env::LINUX);
|
||||
|
||||
def AIFamily = distinct CInt;
|
||||
def AIProtocol = distinct CInt;
|
||||
def AISockType = distinct CInt;
|
||||
def AIFlags = distinct CInt;
|
||||
distinct AIFamily = CInt;
|
||||
distinct AIProtocol = CInt;
|
||||
distinct AISockType = CInt;
|
||||
distinct AIFlags = CInt;
|
||||
|
||||
def Socklen_t = CUInt @if(!env::WIN32);
|
||||
def Socklen_t = usz @if(env::WIN32);
|
||||
|
||||
def SockAddrPtr = distinct void*;
|
||||
distinct SockAddrPtr = void*;
|
||||
|
||||
struct AddrInfo
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ import libc;
|
||||
const int F_GETFL = 3;
|
||||
const int F_SETFL = 4;
|
||||
|
||||
def NativeSocket = distinct inline Fd;
|
||||
distinct NativeSocket = inline Fd;
|
||||
|
||||
struct Posix_pollfd
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ const int FIONREAD = 1074030207;
|
||||
const int FIONBIO = -2147195266;
|
||||
const int FIOASYNC = -2147195267;
|
||||
|
||||
def NativeSocket = distinct uptr;
|
||||
distinct NativeSocket = uptr;
|
||||
|
||||
extern fn CInt ioctlsocket(NativeSocket, CLong cmd, CULong *argp);
|
||||
extern fn WSAError closesocket(NativeSocket);
|
||||
|
||||
Reference in New Issue
Block a user