package com.ruoyi.cai.ws.util;

import com.alibaba.fastjson2.JSON;
import com.ruoyi.cai.ws.dto.WsR;

import java.util.List;

public class RoomWebSocketUtil {
    public static void sendSendMessage(String sessionKey, WsR r){
        WebSocketUtils.sendMessage(sessionKey, JSON.toJSONString(r));
    }

    public static void sendSendMessage(List<String> sessionKey, WsR r){
        for (String s : sessionKey) {
            WebSocketUtils.sendMessage(s, JSON.toJSONString(r));
        }
    }

}
