-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from fucongcong/develop
add rpc
- Loading branch information
Showing
12 changed files
with
92 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
return [ | ||
|
||
'cache_dir' => 'runtime/rpc', | ||
|
||
'current_server' => 'tcp', | ||
|
||
'server' => [ | ||
//连接类型 | ||
'tcp' => [ | ||
|
||
'host' => '127.0.0.1', | ||
'port' => '9396', | ||
], | ||
|
||
'http' => [ | ||
|
||
'host' => '127.0.0.1', | ||
'port' => '9397', | ||
], | ||
|
||
'ws' => [ | ||
|
||
'host' => '127.0.0.1', | ||
'port' => '9394', | ||
], | ||
], | ||
|
||
'setting' => [ | ||
'reactor_num' => 4, | ||
'worker_num' => 25, //worker process num | ||
'backlog' => 128, //listen backlog | ||
'max_request' => 2000, | ||
'heartbeat_idle_time' => 30, | ||
'heartbeat_check_interval' => 10, | ||
'dispatch_mode' => 3, | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
define('__ROOT__', realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR); | ||
require_once __ROOT__.'vendor/hprose/hprose/src/Hprose.php'; | ||
require_once __ROOT__.'vendor/group/group-framework/core/Group/RpcKernal.php'; | ||
|
||
$kernal = new RpcKernal('tcp'); | ||
$kernal->init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters