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
ed885a79
Commit
ed885a79
authored
4 years ago
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新swoole
parent
afd4ade7
Pipeline
#196
canceled with stages
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
+3
-4
swoole.php
app/Console/Commands/swoole.php
+1
-1
swooleMeTcp.php
app/Console/Commands/swooleMeTcp.php
+0
-1
zehongTcp.php
app/Console/Commands/zehongTcp.php
+2
-2
No files found.
app/Console/Commands/swoole.php
View file @
ed885a79
...
...
@@ -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
|
SWOOLE_PROCESS
,
SWOOLE_SOCK_TCP
|
SWOOLE_SSL
);
//创建一个端口
$this
->
ws
=
new
\swoole_websocket_server
(
'0.0.0.0'
,
9502
,
SWOOLE_PROCESS
,
SWOOLE_SOCK_TCP
|
SWOOLE_SSL
);
//创建一个端口
$this
->
ws
->
set
(
array
(
'reactor_num'
=>
2
,
//reactor线程数
'worker_num'
=>
4
,
//worker进程数
...
...
This diff is collapsed.
Click to expand it.
app/Console/Commands/swooleMeTcp.php
View file @
ed885a79
...
...
@@ -59,7 +59,6 @@ class swooleMeTcp extends Command
$this
->
tcp
=
new
\swoole_server
(
'0.0.0.0'
,
9503
,
SWOOLE_PROCESS
);
$this
->
tcp
->
addlistener
(
'0.0.0.0'
,
9504
,
SWOOLE_SOCK_TCP
);
// 添加 TCP端口监听
$this
->
tcp
->
addlistener
(
'0.0.0.0'
,
9505
,
SWOOLE_SOCK_TCP
);
// 添加 TCP端口监听
// $this->tcp->addlistener('0.0.0.0', 9506,SWOOLE_SOCK_TCP); // 添加 TCP端口监听
$this
->
tcp
->
set
([
'worker_num'
=>
2
,
//设置启动的 Worker 进程数
'max_request'
=>
30
,
//最大任务数
...
...
This diff is collapsed.
Click to expand it.
app/Console/Commands/zehongTcp.php
View file @
ed885a79
...
...
@@ -56,7 +56,7 @@ class zehongTcp extends Command
public
function
start
()
{
$url
=
config
(
'public.swooletcpurl'
);
$this
->
tcp
=
new
\swoole_server
(
'0.0.0.0'
,
950
3
,
SWOOLE_PROCESS
);
$this
->
tcp
=
new
\swoole_server
(
'0.0.0.0'
,
950
6
,
SWOOLE_PROCESS
);
$this
->
tcp
->
set
([
'worker_num'
=>
2
,
//设置启动的 Worker 进程数
'max_request'
=>
30
,
//最大任务数
...
...
This diff is collapsed.
Click to expand it.
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