A set of simple wrapper functions for Berkley sockets, based on http://www.cis.temple.edu/~giorgio/old/cis307s96/readings/docs/sockets.html