Метод |
Описание |
|
bind ( string $address, $context ) |
|
|
clear ( Client $client ) |
|
|
clearKeepAliveTimeout ( Client $client ) |
|
|
close ( Client $client ) |
|
|
doStart ( ) : Generator |
|
|
doStop ( ) : Generator |
|
|
dropPrivileges ( ) |
|
|
export ( Client $client ) : Closure |
|
|
failCryptoNegotiation ( $socket, $ip ) |
|
|
generateBindableAddressContextMap ( ) |
|
|
importClient ( $socket, $ip, $port ) |
|
|
initializeRequest ( Client $client, array $parseResult ) : InternalRequest |
|
|
initializeResponse ( InternalRequest $ireq, array $filters ) : aerys\Response |
|
|
logDebug ( $message ) |
This function MUST always return TRUE. It should only be invoked
inside an assert() block so that we can cancel its opcodes when
in production mode. This approach allows us to take full advantage
of debug mode log output without adding superfluous method call
overhead in production environments. |
|
makePrivateCallable ( string $method ) : Closure |
We frequently have to pass callables to outside code (like amp). |
|
negotiateCrypto ( string $watcherId, $socket, $peer ) |
|
|
notify ( ) : Promise |
Notify observers of a server state change |
|
onAcceptable ( string $watcherId, $server ) |
|
|
onApplicationError ( Throwable $error, InternalRequest $ireq, aerys\Response $response, array $filters ) |
|
|
onCoroutineAppResolve ( $error, $result, $info ) |
|
|
onEntitySizeWarning ( Client $client, array $parseResult ) |
|
|
onParseEmit ( Client $client, $eventType, $parseResult, $errorStruct = null ) |
|
|
onParseError ( Client $client, array $parseResult, string $error ) |
|
|
onParsedEntityHeaders ( Client $client, array $parseResult ) |
|
|
onParsedEntityPart ( Client $client, array $parseResult ) |
|
|
onParsedMessageWithEntity ( Client $client, array $parseResult ) |
|
|
onParsedMessageWithoutEntity ( Client $client, array $parseResult ) |
|
|
onReadable ( string $watcherId, $socket, $client ) |
|
|
onResponseDataDone ( Client $client ) |
|
|
onWritable ( string $watcherId, $socket, $client ) |
|
|
renewKeepAliveTimeout ( Client $client ) |
|
|
respond ( InternalRequest $ireq ) |
|
|
sendPreAppInvalidHostResponse ( aerys\Request $request, aerys\Response $response ) |
|
|
sendPreAppMethodNotAllowedResponse ( aerys\Request $request, aerys\Response $response ) |
|
|
sendPreAppOptionsResponse ( aerys\Request $request, aerys\Response $response ) |
|
|
sendPreAppServiceUnavailableResponse ( aerys\Request $request, aerys\Response $response ) |
|
|
sendPreAppTraceResponse ( aerys\Request $request, aerys\Response $response ) |
|
|
setTrace ( InternalRequest $ireq ) |
|
|
timeoutKeepAlives ( integer $now ) |
|
|
tryApplication ( InternalRequest $ireq, callable $application, array $filters ) |
|
|
tryErrorResponse ( Throwable $error, InternalRequest $ireq, aerys\Response $response, array $filters ) |
|
|
tryFilterErrorResponse ( Throwable $error, InternalRequest $ireq, array $filters ) |
When an uncaught exception is thrown by a filter we enable the $ireq->filterErrorFlag
and add the offending filter's key to $ireq->badFilterKeys. Each time we initialize
a response the bad filters are removed from the chain in an effort to invoke all possible
filters. To handle the scenario where multiple filters error we need to continue looping
until $ireq->filterErrorFlag no longer reports as true. |
|
writeResponse ( Client $client, $final = false ) |
|
|