PHP Class Cli\WS

ファイルを表示 Open project: bcosca/fatfree-core

Protected Properties

Property Type Description
$addr @}
$agents @}
$ctx @}
$events @}
$sockets @}
$wait @}

Public Methods

Method Description
__construct ( $addr, $ctx = NULL, $wait = 60 ) : object Instantiate object
agents ( $uri = NULL ) : array Return socket agents
alloc ( $socket ) : null Allocate stream socket
close ( $socket ) : null Close stream socket
events ( ) : array Return event handlers
free ( $socket ) : boolean Free stream socket
kill ( $signal ) : null Terminate server
on ( $event, $func ) : object Bind function to event handler
read ( $socket ) : string | FALSE Read from stream socket
run ( ) : object Execute the server process
write ( $socket, $str ) : integer | FALSE Write to stream socket

Method Details

__construct() public method

Instantiate object
public __construct ( $addr, $ctx = NULL, $wait = 60 ) : object
$addr string
$ctx resource
$wait int
return object

agents() public method

Return socket agents
public agents ( $uri = NULL ) : array
$uri string *
return array

alloc() public method

Allocate stream socket
public alloc ( $socket ) : null
$socket resource
return null

close() public method

Close stream socket
public close ( $socket ) : null
$socket resource
return null

events() public method

Return event handlers
public events ( ) : array
return array

free() public method

Free stream socket
public free ( $socket ) : boolean
$socket resource
return boolean

kill() public method

Terminate server
public kill ( $signal ) : null
$signal int
return null

on() public method

Bind function to event handler
public on ( $event, $func ) : object
$event string
$func callable
return object

read() public method

Read from stream socket
public read ( $socket ) : string | FALSE
$socket resource
return string | FALSE

run() public method

Execute the server process
public run ( ) : object
return object

write() public method

Write to stream socket
public write ( $socket, $str ) : integer | FALSE
$socket resource
$str string
return integer | FALSE

Property Details

$addr protected_oe property

@}
protected $addr

$agents protected_oe property

@}
protected $agents

$ctx protected_oe property

@}
protected $ctx

$events protected_oe property

@}
protected $events

$sockets protected_oe property

@}
protected $sockets

$wait protected_oe property

@}
protected $wait