Files
dafuweng-saiadmin6.x/server/config/plugin/webman/channel/process.php

34 lines
929 B
PHP

<?php
/**
* This file is part of webman.
*
* Licensed under The MIT License
* For full copyright and license information, please see the MIT-LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @author walkor<walkor@workerman.net>
* @copyright walkor<walkor@workerman.net>
* @link http://www.workerman.net/
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
use Webman\Channel\Server;
use Workerman\Protocols\Frame;
$listenHost = env('WEBMAN_CHANNEL_LISTEN_HOST', '0.0.0.0');
$listenPort = filter_var(env('WEBMAN_CHANNEL_PORT'), FILTER_VALIDATE_INT);
if ($listenPort === false) {
$listenPort = 2207;
}
return [
'server' => [
'listen' => 'frame://' . $listenHost . ':' . $listenPort,
'protocol' => Frame::class,
'handler' => Server::class,
'reloadable' => false,
'count' => 1, // 必须是1
]
];