Property | Type | Description | |
---|---|---|---|
$buffer_header | |||
$buffer_maxlen | |||
$swoole_server |
Method | Description | |
---|---|---|
__construct ( $config = [] ) | 错误,丢弃此包 | |
afterResponse ( |
||
checkData ( $client_id, $http_data ) | ||
checkHeader ( $client_id, $http_data ) : boolean | |
||
checkPost ( |
||
cleanBuffer ( $fd ) | ||
doStaticRequest ( |
过滤请求,阻止静止访问的目录,处理静态文件 | |
getSwooleServer ( ) : swoole_server | ||
httpError ( $code, |
发生了http错误 | |
onClose ( $serv, $client_id, $from_id ) | ||
onConnect ( $serv, $client_id, $from_id ) | ||
onErrorHandle ( $errno, $errstr, $errfile, $errline ) | 捕获set_error_handle错误 | |
onErrorShutDown ( ) | 捕获register_shutdown_function错误 | |
onReceive ( $serv, $client_id, $from_id, $data ) : null | 接收到数据 | |
onRequest ( |
处理请求 | |
onShutdown ( $serv ) | ||
onStart ( $serv, $worker_id ) | ||
parseRequest ( $request ) : null | 解析请求 | |
processDynamic ( |
处理动态请求 | |
processStatic ( |
处理静态请求 | |
response ( |
发送响应 |
Method | Description | |
---|---|---|
errorResponse ( $error ) | 错误显示 |
public afterResponse ( |
||
$request | ||
$response |
public checkHeader ( $client_id, $http_data ) : boolean | |
||
$client_id | ||
$http_data | ||
return | boolean | |
public doStaticRequest ( |
||
$request | ||
$response | ||
return | boolean |
public onErrorHandle ( $errno, $errstr, $errfile, $errline ) |
public onRequest ( |
||
$request | ||
return |
public parseRequest ( $request ) : null | ||
$request | Swoole\Request | |
return | null |
public processDynamic ( |
||
$request | ||
$response |
public processStatic ( |
||
$request | ||
$response | ||
return | boolean |