get the function to send message to server,but the server can't send message to the correct client