Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
laravelzh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冯超鹏
laravelzh
Commits
48f04194
Commit
48f04194
authored
Oct 19, 2020
by
冯超鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tcp ssl
parent
18d7a190
Pipeline
#150
canceled with stages
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
9 deletions
+9
-9
alarm.php
app/Console/Commands/alarm.php
+1
-1
chemicalswb.php
app/Console/Commands/chemicalswb.php
+1
-1
firewb.php
app/Console/Commands/firewb.php
+1
-1
swoole.php
app/Console/Commands/swoole.php
+1
-1
swooleMeTcp.php
app/Console/Commands/swooleMeTcp.php
+4
-4
swooleMqtt.php
app/Console/Commands/swooleMqtt.php
+1
-1
No files found.
app/Console/Commands/alarm.php
View file @
48f04194
...
...
@@ -57,7 +57,7 @@ class alarm extends Command
{
$url
=
config
(
'public.swoolwebsocketurl'
);
$por
=
config
(
'public.swoolwebsocketurlpor'
);
$this
->
ws
=
new
\swoole_websocket_server
(
'0.0.0.0'
,
9601
);
//创建一个端口
$this
->
ws
=
new
\swoole_websocket_server
(
'0.0.0.0'
,
9601
,
SWOOLE_SOCK_TCP
|
SWOOLE_SSL
);
//创建一个端口
$this
->
ws
->
set
(
array
(
'reactor_num'
=>
2
,
//reactor线程数
'worker_num'
=>
4
,
//worker进程数
...
...
app/Console/Commands/chemicalswb.php
View file @
48f04194
...
...
@@ -57,7 +57,7 @@ class chemicalswb extends Command
{
$url
=
config
(
'public.swoolwebsocketurl'
);
$por
=
config
(
'public.swoolwebsocketurlpor'
);
$this
->
ws
=
new
\swoole_websocket_server
(
'0.0.0.0'
,
9507
);
//创建一个端口
$this
->
ws
=
new
\swoole_websocket_server
(
'0.0.0.0'
,
9507
,
SWOOLE_SOCK_TCP
|
SWOOLE_SSL
);
//创建一个端口
$this
->
ws
->
set
(
array
(
'reactor_num'
=>
2
,
//reactor线程数
'worker_num'
=>
4
,
//worker进程数
...
...
app/Console/Commands/firewb.php
View file @
48f04194
...
...
@@ -57,7 +57,7 @@ class firewb extends Command
{
$url
=
config
(
'public.swoolwebsocketurl'
);
$por
=
config
(
'public.swoolwebsocketurlpor'
);
$this
->
ws
=
new
\swoole_websocket_server
(
'0.0.0.0'
,
9508
);
//创建一个端口
$this
->
ws
=
new
\swoole_websocket_server
(
'0.0.0.0'
,
9508
,
SWOOLE_SOCK_TCP
|
SWOOLE_SSL
);
//创建一个端口
$this
->
ws
->
set
(
array
(
'reactor_num'
=>
2
,
//reactor线程数
'worker_num'
=>
4
,
//worker进程数
...
...
app/Console/Commands/swoole.php
View file @
48f04194
...
...
@@ -57,7 +57,7 @@ class swoole extends Command
{
$url
=
config
(
'public.swoolwebsocketurl'
);
$por
=
config
(
'public.swoolwebsocketurlpor'
);
$this
->
ws
=
new
\swoole_websocket_server
(
'0.0.0.0'
,
9502
);
//创建一个端口
$this
->
ws
=
new
\swoole_websocket_server
(
'0.0.0.0'
,
9502
,
SWOOLE_SOCK_TCP
|
SWOOLE_SSL
);
//创建一个端口
$this
->
ws
->
set
(
array
(
'reactor_num'
=>
2
,
//reactor线程数
'worker_num'
=>
4
,
//worker进程数
...
...
app/Console/Commands/swooleMeTcp.php
View file @
48f04194
...
...
@@ -55,10 +55,10 @@ class swooleMeTcp extends Command
public
function
start
()
{
$url
=
config
(
'public.swooletcpurl'
);
$this
->
tcp
=
new
\swoole_server
(
'0.0.0.0'
,
9503
);
$this
->
tcp
->
addlistener
(
$url
,
9504
,
SWOOLE_SOCK_TCP
);
// 添加 TCP端口监听
$this
->
tcp
->
addlistener
(
$url
,
9505
,
SWOOLE_SOCK_TCP
);
// 添加 TCP端口监听
$this
->
tcp
->
addlistener
(
$url
,
9506
,
SWOOLE_SOCK_TCP
);
// 添加 TCP端口监听
$this
->
tcp
=
new
\swoole_server
(
'0.0.0.0'
,
9503
,
SWOOLE_PROCESS
,
SWOOLE_SOCK_TCP
|
SWOOLE_SSL
);
$this
->
tcp
->
addlistener
(
'0.0.0.0'
,
9504
,
SWOOLE_PROCESS
,
SWOOLE_SOCK_TCP
|
SWOOLE_SSL
);
// 添加 TCP端口监听
$this
->
tcp
->
addlistener
(
'0.0.0.0'
,
9505
,
SWOOLE_PROCESS
,
SWOOLE_SOCK_TCP
|
SWOOLE_SSL
);
// 添加 TCP端口监听
$this
->
tcp
->
addlistener
(
'0.0.0.0'
,
9506
,
SWOOLE_PROCESS
,
SWOOLE_SOCK_TCP
|
SWOOLE_SSL
);
// 添加 TCP端口监听
$this
->
tcp
->
set
([
'worker_num'
=>
2
,
//设置启动的 Worker 进程数
'max_request'
=>
30
,
//最大任务数
...
...
app/Console/Commands/swooleMqtt.php
View file @
48f04194
...
...
@@ -72,7 +72,7 @@ class swooleMqtt extends Command
}
public
function
start
()
{
$this
->
mqtt
=
new
\swoole_server
(
"0.0.0.0"
,
9506
,
SWOOLE_BASE
);
$this
->
mqtt
=
new
\swoole_server
(
"0.0.0.0"
,
9506
,
SWOOLE_BASE
,
SWOOLE_SOCK_TCP
|
SWOOLE_SSL
);
$this
->
mqtt
->
set
([
'open_mqtt_protocol'
=>
true
,
// 启用 mqtt 协议
'worker_num'
=>
1
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment