Refactor the socket classes. All sockets have the same methods, and all inhert from same set of interfaces.