Move read/write operations from client-handler to socket-server.