static void Main(String[] args) { RongCloud rongCloud = RongCloud.GetInstance(appKey, appSecret); //自定义 api地址方式 //RongCloud rongCloud = RongCloud.getInstance(appKey, appSecret,api); Distribute distribute = rongCloud.Chatroom.distribute; /** * API 文档: http://www.rongcloud.cn/docs/server_sdk_api/chatroom/distribute.html#stop * * 聊天室消息停止分发 * */ ChatroomModel chatroomModel = new ChatroomModel() { Id = "d7ec7a8b8d8546c98b0973417209a548" }; ResponseResult result = distribute.Stop(chatroomModel); Console.WriteLine("stopDistributionMessage: " + result.ToString()); /** * API 文档: http://www.rongcloud.cn/docs/server_sdk_api/chatroom/distribute.html#resume * * 聊天室消息恢复分发方法(每秒钟限 100 次) */ ResponseResult resumeResult = distribute.Resume(chatroomModel); Console.WriteLine("resumeDistributionMessage: " + resumeResult.ToString()); Console.ReadLine(); }
public void GameStart() { if (GameStarted) { return; } this.LoginPermission = false; // 游戏开始后不允许再登陆 this.ConnectPermission = false; // after game start do not allow to connect Ready(); GameStarted = true; GamePaused = false; Distribute.Stop(); // stop distribute server Round = 0; Grade = new Dictionary <string, int>(); RoundGrade = new Dictionary <string, int>(); GameThread = new Thread(GameRun); GameThread.Start(); }