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 :])));