update client and server to use sockets