implemented simple classes to wrap sockets