符合中小企业对网站设计、功能常规化式的企业展示型网站建设
本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...
商城网站建设因基本功能的需求不同费用上面也有很大的差别...
手机微信网站开发、微信官网、微信商城网站...
composer require workerman/gateway-worker
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){
$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']
);
$ret = json_encode($arr);
return GateWay::sendToCurrentClient($ret);
}
public static function onMessage($client_id, $message){
return GateWay::sendToCurrentClient($message);
}
public static function onClose($client_id){
GateWay::sendToAll("client[$client_id] logout\n");
}
}
Worker::runAll();
Document