// Wrapper around the accept system call that marks the returned file // descriptor as nonblocking and close-on-exec. private static (long, syscall.Sockaddr, @string, error) accept(long s) { long _p0 = default; syscall.Sockaddr _p0 = default; @string _p0 = default; error _p0 = default !;
private static Addr sockaddrToTCP(syscall.Sockaddr sa) { switch (sa.type()) { case ptr <syscall.SockaddrInet4> sa: return(addr(new TCPAddr(IP: sa.Addr[0 :], Port: sa.Port)));
private static Addr sockaddrToIP(syscall.Sockaddr sa) { switch (sa.type()) { case ptr <syscall.SockaddrInet4> sa: return(addr(new IPAddr(IP: sa.Addr[0 :])));
public operation(syscall.Overlapped o = default, System.UIntPtr runtimeCtx = default, int mode = default, int errno = default, uint qty = default, ref ptr <FD> fd = default, syscall.WSABuf buf = default, windows.WSAMsg msg = default, syscall.Sockaddr sa = default, ref ptr <syscall.RawSockaddrAny> rsa = default, int rsan = default, syscall.Handle handle = default, uint flags = default, slice <syscall.WSABuf> bufs = default) { this.o = o; this.runtimeCtx = runtimeCtx; this.mode = mode; this.errno = errno; this.qty = qty; this.fd = fd; this.buf = buf; this.msg = msg; this.sa = sa; this.rsa = rsa; this.rsan = rsan; this.handle = handle; this.flags = flags; this.bufs = bufs; }