socket wrapper
clean and sockets completed