Skip to content

Commit

Permalink
修改协议包最大长度
Browse files Browse the repository at this point in the history
修改协议包最大长度
  • Loading branch information
qieangel2013 committed Sep 18, 2016
1 parent 442ae97 commit 8f4e977
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/FileDistributedClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function addServerClient($address)
'package_length_type' => 'N',
'package_length_offset' => 0, //第N个字节是包长度的值
'package_body_offset' => 4, //第几个字节开始计算长度
'package_max_length' => 2000000 //协议最大长度
'package_max_length' => 1024 * 1024 * 20 //协议最大长度
));
$client->on('Connect', array(
&$this,
Expand Down
4 changes: 2 additions & 2 deletions server/FileDistributedServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __construct()
'package_length_type' => 'N',
'package_length_offset' => 0, //第N个字节是包长度的值
'package_body_offset' => 4, //第几个字节开始计算长度
'package_max_length' => 2000000, //协议最大长度
'package_max_length' => 1024 * 1024 * 20, //协议最大长度
'log_file' => ServerLog
));
} else {
Expand All @@ -60,7 +60,7 @@ public function __construct()
'package_length_type' => 'N',
'package_length_offset' => 0, //第N个字节是包长度的值
'package_body_offset' => 4, //第几个字节开始计算长度
'package_max_length' => 2000000, //协议最大长度
'package_max_length' => 1024 * 1024 * 20, //协议最大长度
'daemonize' => true
));
}
Expand Down

0 comments on commit 8f4e977

Please sign in to comment.