for socket server