PHP Class Swoole\Network\Server

Inheritance: extends Swoole\Server\Base, implements Swoole\Server\Driver
Mostrar archivo Open project: matyhtf/swoole_framework Class Usage Examples

Public Properties

Property Type Description
$defaultOptions
$optionKit
$pidFile
$swooleMode
$useSwooleHttpServer

Protected Properties

Property Type Description
$beforeReloadCallback
$beforeStopCallback
$pid_file
$sw swoole_server

Public Methods

Method Description
__call ( $func, $params )
__construct ( $host, $port, $ssl = false )
addOption ( $specString, $description ) $opt->add( 'f|foo:' , 'option requires a value.' ); $opt->add( 'b|bar+' , 'option with multiple value.' ); $opt->add( 'z|zoo?' , 'option with optional value.' ); $opt->add( 'v|verbose' , 'verbose message.' ); $opt->add( 'd|debug' , 'debug message.' ); $opt->add( 'long' , 'long option name only.' ); $opt->add( 's' , 'short option name only.' );
autoCreate ( $host, $port, boolean $ssl = false ) : Server 自动推断扩展支持 默认使用swoole扩展,其次是libevent,最后是select(支持windows)
beforeReload ( callable $function )
beforeStop ( callable $function )
close ( $client_id )
connection_info ( $fd )
daemonize ( )
killProcessByName ( $name, integer $signo = 9 ) : string 杀死所有进程
onManagerStop ( )
onMasterStart ( $serv )
onMasterStop ( $serv )
onWorkerStart ( $serv, $worker_id )
run ( $setting = [] )
send ( $client_id, $data )
setPidFile ( $pidFile ) 设置PID文件
setProtocol ( $protocol )
shutdown ( )
start ( $startFunction ) 显示命令行指令

Method Details

__call() public method

public __call ( $func, $params )

__construct() public method

public __construct ( $host, $port, $ssl = false )

addOption() static public method

$opt->add( 'f|foo:' , 'option requires a value.' ); $opt->add( 'b|bar+' , 'option with multiple value.' ); $opt->add( 'z|zoo?' , 'option with optional value.' ); $opt->add( 'v|verbose' , 'verbose message.' ); $opt->add( 'd|debug' , 'debug message.' ); $opt->add( 'long' , 'long option name only.' ); $opt->add( 's' , 'short option name only.' );
static public addOption ( $specString, $description )
$specString
$description

autoCreate() static public method

自动推断扩展支持 默认使用swoole扩展,其次是libevent,最后是select(支持windows)
static public autoCreate ( $host, $port, boolean $ssl = false ) : Server
$host
$port
$ssl boolean
return Server

beforeReload() static public method

static public beforeReload ( callable $function )
$function callable

beforeStop() static public method

static public beforeStop ( callable $function )
$function callable

close() public method

public close ( $client_id )

connection_info() public method

public connection_info ( $fd )

daemonize() public method

public daemonize ( )

killProcessByName() static public method

杀死所有进程
static public killProcessByName ( $name, integer $signo = 9 ) : string
$name
$signo integer
return string

onManagerStop() public method

public onManagerStop ( )

onMasterStart() public method

public onMasterStart ( $serv )

onMasterStop() public method

public onMasterStop ( $serv )

onWorkerStart() public method

public onWorkerStart ( $serv, $worker_id )

run() public method

public run ( $setting = [] )

send() public method

public send ( $client_id, $data )

setPidFile() static public method

设置PID文件
static public setPidFile ( $pidFile )
$pidFile

setProtocol() public method

public setProtocol ( $protocol )
$protocol

shutdown() public method

public shutdown ( )

start() static public method

显示命令行指令
static public start ( $startFunction )

Property Details

$beforeReloadCallback protected_oe static_oe property

protected static $beforeReloadCallback

$beforeStopCallback protected_oe static_oe property

protected static $beforeStopCallback

$defaultOptions static_oe public_oe property

static public $defaultOptions

$optionKit static_oe public_oe property

static public $optionKit

$pidFile static_oe public_oe property

static public $pidFile

$pid_file protected_oe property

protected $pid_file

$sw protected_oe property

protected swoole_server $sw
return swoole_server

$swooleMode static_oe public_oe property

static public $swooleMode

$useSwooleHttpServer static_oe public_oe property

static public $useSwooleHttpServer