socket server and its testing