PHP Class blink\server\SwServer

Inheritance: extends Server
Mostrar archivo Open project: bixuehujin/blink

Public Properties

Property Type Description
$asDaemon boolean Detach the server process and run as daemon.
$logFile string Specifies the path where logs should be stored in.
$maxPackageLength integer The max package length in bytes for swoole, which is default to 2M (1024 * 1024 * 2). Please refer http://wiki.swoole.com/wiki/page/301.html for more detailed information.
$maxRequests integer The number of requests each process should execute before respawning, This can be useful to work around with possible memory leaks.
$numWorkers integer The number of workers should be started to serve requests.
$outputBufferSize integer The output buffer size, see http://wiki.swoole.com/wiki/page/440.html

Public Methods

Method Description
onFinish ( $server, $taskId, $data )
onManagerStart ( $server )
onRequest ( $request, $response )
onServerStart ( $server )
onServerStop ( )
onTask ( $server, $taskId, $fromId, $data )
onWorkerStart ( )
onWorkerStop ( )
run ( )

Protected Methods

Method Description
createServer ( )
normalizeFiles ( $files )
normalizedConfig ( )
prepareRequest ( $request )

Method Details

createServer() protected method

protected createServer ( )

normalizeFiles() protected method

protected normalizeFiles ( $files )

normalizedConfig() protected method

protected normalizedConfig ( )

onFinish() public method

public onFinish ( $server, $taskId, $data )

onManagerStart() public method

public onManagerStart ( $server )

onRequest() public method

public onRequest ( $request, $response )

onServerStart() public method

public onServerStart ( $server )

onServerStop() public method

public onServerStop ( )

onTask() public method

public onTask ( $server, $taskId, $fromId, $data )

onWorkerStart() public method

public onWorkerStart ( )

onWorkerStop() public method

public onWorkerStop ( )

prepareRequest() protected method

protected prepareRequest ( $request )

run() public method

public run ( )

Property Details

$asDaemon public_oe property

Detach the server process and run as daemon.
public bool $asDaemon
return boolean

$logFile public_oe property

Specifies the path where logs should be stored in.
public string $logFile
return string

$maxPackageLength public_oe property

The max package length in bytes for swoole, which is default to 2M (1024 * 1024 * 2). Please refer http://wiki.swoole.com/wiki/page/301.html for more detailed information.
public int $maxPackageLength
return integer

$maxRequests public_oe property

The number of requests each process should execute before respawning, This can be useful to work around with possible memory leaks.
public int $maxRequests
return integer

$numWorkers public_oe property

The number of workers should be started to serve requests.
public int $numWorkers
return integer

$outputBufferSize public_oe property

The output buffer size, see http://wiki.swoole.com/wiki/page/440.html
public int $outputBufferSize
return integer