123
This commit is contained in:
@@ -18,7 +18,7 @@ public class AgoreTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void closeChannel(){
|
public void closeChannel(){
|
||||||
Long roomId = 1779868994539642881L;
|
Long roomId = 1779938276812283906L;
|
||||||
// List<String> channelUsers = agora.getChannelUsers(roomId);
|
// List<String> channelUsers = agora.getChannelUsers(roomId);
|
||||||
// System.out.println(JSON.toJSONString(channelUsers));
|
// System.out.println(JSON.toJSONString(channelUsers));
|
||||||
agora.closeChannel(roomId);
|
agora.closeChannel(roomId);
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public class Agora {
|
|||||||
String url = "https://api.sd-rtn.com/dev/v1/kicking-rule";
|
String url = "https://api.sd-rtn.com/dev/v1/kicking-rule";
|
||||||
Map<String,Object> bodyData = new HashMap<>();
|
Map<String,Object> bodyData = new HashMap<>();
|
||||||
bodyData.put("appid",agoraProperties.getAppId());
|
bodyData.put("appid",agoraProperties.getAppId());
|
||||||
bodyData.put("cname",roomId);
|
bodyData.put("cname",roomId+"");
|
||||||
bodyData.put("time",0);
|
bodyData.put("time",0);
|
||||||
bodyData.put("privileges", Collections.singletonList("join_channel"));
|
bodyData.put("privileges", Collections.singletonList("join_channel"));
|
||||||
HttpHeaders headers = new HttpHeaders();
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public class RoomWebSocketHandler extends AbstractWebSocketHandler {
|
|||||||
public void afterConnectionClosed(WebSocketSession session, CloseStatus status) {
|
public void afterConnectionClosed(WebSocketSession session, CloseStatus status) {
|
||||||
String token = String.valueOf(session.getAttributes().get("token"));
|
String token = String.valueOf(session.getAttributes().get("token"));
|
||||||
// TODO 连接关闭 是否要删除fd的关系
|
// TODO 连接关闭 是否要删除fd的关系
|
||||||
WebSocketSessionHolder.removeSession(token);
|
WebSocketSessionHolder.removeSession(session.getId());
|
||||||
log.info("[disconnect] sessionId: {},token:{}", session.getId(), token);
|
log.info("[disconnect] sessionId: {},token:{}", session.getId(), token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user