add socket to server and client code