Moved socket interface to public header.