PHP Class PHPDaemon\Servers\HTTP\Connection

Author: Vasily Zorin ([email protected])
Inheritance: extends PHPDaemon\Network\Connection, implements PHPDaemon\Request\IRequestUpstream
Datei anzeigen Open project: kakserpom/phpdaemon

Protected Properties

Property Type Description
$EOL
$currentHeader
$freedBeforeProcessing
$initialHighMark initial value of the maximum amout of bytes in buffer
$initialLowMark
$keepaliveTimer
$policyReqNotFound
$req
$timeout

Public Methods

Method Description
badRequest ( $req ) : void Send Bad request
checkChunkedEncCap ( ) : boolean Check if Chunked encoding is supported here.
checkSendfileCap ( ) : boolean Check if Sendfile is supported here.
endRequest ( $req, $appStatus, $protoStatus ) : void End request
freeRequest ( $req ) : void Frees this request
getKeepaliveTimeout ( ) : integer
onFinish ( ) : void Called when connection is finished
requestOut ( object $req, string $s ) : boolean Handles the output from downstream requests.

Protected Methods

Method Description
httpProcessHeaders ( ) : boolean Process HTTP headers
httpReadFirstline ( ) : boolean | null Read first line of HTTP request
httpReadHeaders ( ) : boolean | null Read headers line-by-line
newRequest ( ) : stdClass Creates new Request object
onRead ( ) : void onRead

Method Details

badRequest() public method

Send Bad request
public badRequest ( $req ) : void
return void

checkChunkedEncCap() public method

Check if Chunked encoding is supported here.
public checkChunkedEncCap ( ) : boolean
return boolean Succes

checkSendfileCap() public method

Check if Sendfile is supported here.
public checkSendfileCap ( ) : boolean
return boolean Succes

endRequest() public method

End request
public endRequest ( $req, $appStatus, $protoStatus ) : void
return void

freeRequest() public method

Frees this request
public freeRequest ( $req ) : void
return void

getKeepaliveTimeout() public method

public getKeepaliveTimeout ( ) : integer
return integer

httpProcessHeaders() protected method

Process HTTP headers
protected httpProcessHeaders ( ) : boolean
return boolean Success

httpReadFirstline() protected method

Read first line of HTTP request
protected httpReadFirstline ( ) : boolean | null
return boolean | null Success

httpReadHeaders() protected method

Read headers line-by-line
protected httpReadHeaders ( ) : boolean | null
return boolean | null Success

newRequest() protected method

Creates new Request object
protected newRequest ( ) : stdClass
return stdClass

onFinish() public method

Called when connection is finished
public onFinish ( ) : void
return void

onRead() protected method

onRead
protected onRead ( ) : void
return void

requestOut() public method

Handles the output from downstream requests.
public requestOut ( object $req, string $s ) : boolean
$req object \PHPDaemon\Request\Generic.
$s string The output.
return boolean Success

Property Details

$EOL protected_oe property

protected $EOL

$currentHeader protected_oe property

protected $currentHeader

$freedBeforeProcessing protected_oe property

protected $freedBeforeProcessing

$initialHighMark protected_oe property

initial value of the maximum amout of bytes in buffer
protected $initialHighMark

$initialLowMark protected_oe property

protected $initialLowMark

$keepaliveTimer protected_oe property

protected $keepaliveTimer

$policyReqNotFound protected_oe property

protected $policyReqNotFound

$req protected_oe property

protected $req

$timeout protected_oe property

protected $timeout