Example API I've written a simple network library for my own use Currently only unix, but win32 shouldn't be much of an issue socket fd = comm_open(family, type, proto, note) comm_connect_tcp(fd, host, port, local, socklen, callback, cbdata) comm_read(fd, buf, len, callback, cbdata) comm_write(fd, buf, len, callback, cbdata) comm_close(fd) - All existing IOs are cancelled - no callbacks are called!