Socket class. A wrapper for socket_* functions