1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時(shí)間:8:30-17:00
      你可能遇到了下面的問(wèn)題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷(xiāo)解決方案
      workerman實(shí)現(xiàn)群聊
      1. 服務(wù)端:
        startPort = 30000;
        $gateway->count = 4;
        $gateway->name = 'gateway';
        $gateway->registerAddress = '127.0.0.1:1234';
        $business = new BusinessWorker();
        $business->count = 4;
        $business->registerAddress = '127.0.0.1:1234';
        $register = new Register('text://0.0.0.0:1234');
        $register->name = 'register';
        class Events{
        public static function onConnect($client_id){
            return GateWay::sendToCurrentClient('welcome');
        }
        public static function onMessage($client_id, $message){
            $arr = array(
                    'remote_ip'=>$_SERVER['REMOTE_ADDR'],
                    'remote_port'=>$_SERVER['REMOTE_PORT'],
                    'gate_ip'=>$_SERVER['GATEWAY_ADDR'],
                    'gate_port'=>$_SERVER['GATEWAY_PORT'],
                    'client_id'=>$_SERVER['GATEWAY_CLIENT_ID'],
                );
            var_dump($arr);
            return GateWay::sendToCurrentClient($message);
        }
        public static function onClose($client_id){
           GateWay::sendToAll("client[$client_id] logout\n");
        }
        }
        Worker::runAll();
      2. 客戶端:
        
        
        
        
        Document
        
        
        
        
      3. 效果:
        workerman實(shí)現(xiàn)群聊
        workerman實(shí)現(xiàn)群聊
        workerman實(shí)現(xiàn)群聊

      當(dāng)前文章:workerman實(shí)現(xiàn)群聊
      路徑分享:http://www.ef60e0e.cn/article/pjcioo.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        阜新市| 新郑市| 宝鸡市| 青岛市| 当涂县| 永康市| 望城县| 壶关县| 隆回县| 特克斯县| 神农架林区| 万全县| 米林县| 东方市| 阿拉善左旗| 安图县| 鄂尔多斯市| 湟中县| 大连市| 常宁市| 宁都县| 铁力市| 慈利县| 柳江县| 扎囊县| 武城县| 商水县| 陕西省| 金寨县| 玉门市| 皮山县| 保靖县| 多伦县| 宁河县| 舒城县| 临澧县| 绍兴市| 山东省| 武义县| 尉犁县| 临高县|