redesign socket server, part one