added ThreadedSocket and modified some of the socket classes