메소드 |
설명 |
|
__construct ( $config = [] ) |
错误,丢弃此包 |
|
afterResponse ( Request $request, Response $response ) |
|
|
checkData ( $client_id, $http_data ) |
|
|
checkHeader ( $client_id, $http_data ) : boolean | Request |
|
|
checkPost ( Request $request ) : integer |
|
|
cleanBuffer ( $fd ) |
|
|
doStaticRequest ( Request $request, Response $response ) : boolean |
过滤请求,阻止静止访问的目录,处理静态文件 |
|
getSwooleServer ( ) : swoole_server |
|
|
httpError ( $code, Response $response, string $content = '' ) |
发生了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 ( Request $request ) : Response |
处理请求 |
|
onShutdown ( $serv ) |
|
|
onStart ( $serv, $worker_id ) |
|
|
parseRequest ( $request ) : null |
解析请求 |
|
processDynamic ( Request $request, Response $response ) |
处理动态请求 |
|
processStatic ( Request $request, Response $response ) : boolean |
处理静态请求 |
|
response ( Request $request, Response $response ) : boolean |
发送响应 |
|