public static void sendMessageToUser(String user, String message) {
   try {
     // 向特定的用户发�?�数�?
     System.out.println("send message to user : "******" ,message content : " + message);
     WebSocketMessageInbound inbound = connections.get(user);
     if (inbound != null) {
       inbound.getWsOutbound().writeTextMessage(CharBuffer.wrap(message));
     }
   } catch (IOException e) {
     e.printStackTrace();
   }
 }
 // 向所有的用户发�?�消�?
 public static void sendMessage(String message) {
   try {
     Set<String> keySet = connections.keySet();
     for (String key : keySet) {
       WebSocketMessageInbound inbound = connections.get(key);
       if (inbound != null) {
         System.out.println("send message to user : "******" ,message content : " + message);
         inbound.getWsOutbound().writeTextMessage(CharBuffer.wrap(message));
       }
     }
   } catch (IOException e) {
     e.printStackTrace();
   }
 }