示例#1
0
        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();
        }