FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
framework/examples/soa_server.php at master · rainbowgamer/framework · GitHub
rainbowgamer
framework
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
framework
/
examples
/
soa_server.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
14 lines (12 loc) · 509 Bytes
Breadcrumbs
framework
/
examples
/
soa_server.php
Copy path
File metadata and controls
14 lines (12 loc) · 509 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
define
(
'
DEBUG
'
,
'
on
'
);
define
(
"
WEBPATH
"
,
str_replace
(
"\\"
,
"
/
"
,
__DIR__
));
require
__DIR__
.
'
/../libs/lib_config.php
'
;
$
AppSvr
=
new
Swoole
\
Protocol
\
SOAServer
;
$
AppSvr
->
setLogger
(
new
\
Swoole
\
Log
\
EchoLog
(
true
));
//Logger
$
AppSvr
->
addNameSpace
(
'
BL
'
,
__DIR__
.
'
/class
'
);
Swoole
\Error::
$
echo_html
=
false
;
$
server
=
Swoole
\
Network
\Server::
autoCreate
(
'
0.0.0.0
'
,
8888
);
$
server
->
setProtocol
(
$
AppSvr
);
//$server->daemonize(); //作为守护进程
$
server
->
run
(
array
(
'
worker_num
'
=>
1
,
'
max_request
'
=>
5000
));
Back
|
FazBrowse Home
|
New Git URL