typedef struct Audio Audio; struct Audio { int fd; Channel *in; Channel *out; int inpid; int outpid; }; typedef struct Block Block; struct Block { ulong length; uchar *data; }; enum { CLIENT_CONNECTING = 0, CLIENT_WAITING = 1, CLIENT_CONNECTED = 2, }; typedef struct Client Client; struct Client { int state; uchar me[IPaddrlen]; uchar them[IPaddrlen]; ushort themport; int udpctl; int udpdata; Channel *pkt; vlong pingsent; vlong latency; vlong lastreply; u64int seqin, seqout; uvlong recvpkts; uvlong lostpkts; uvlong bytesin; uvlong bytesout; }; enum { PKT_INVALID = 0ULL, PKT_PING = 1ULL, PKT_PONG = 2ULL, PKT_AUDIO = 3ULL, };