Implement the SocketManager and a base Socket class