Added pthread in SocketServer