报与数据库端口冲突问题
stream_socket_server(): Unable to connect to tcp://127.0.0.1:3306 (Address already in use)
问题出在
'web' => [
'handler' => Gateway::class,
'listen' => 'websocket://0.0.0.0:7171',
'count' => cpu_count(),
'reloadable' => false,
'constructor' => ['config' => [
'lanIp' => '127.0.0.1',
'startPort' => 4300, //不能使用3300段端口号,会与数据库冲突
'pingInterval' => 30,
'pingNotResponseLimit' => 0,
'pingData' => '{"type":"ping"}',
'registerAddress' => '127.0.0.1:1236',
'onConnect' => function(){},
]]
],