Most of this will eventually be moved to arch, once I spend some more time polishing the interface and implementing the BSD sockets version.