PHP Class PHPDaemon\BoundSocket\Generic

Author: Zorin Vasily ([email protected])
Inheritance: use trait PHPDaemon\Traits\ClassWatchdog
Mostrar archivo Open project: kakserpom/phpdaemon

Protected Properties

Property Type Description
$allowselfsigned boolean Allow self-signed?
$cafile string CA file
$certfile string Certificate file
$ctx mixed Context
$ctxname string Context name
$enabled boolean Enabled?
$erroneous boolean Erroneous?
$ev EventListener\Event Event
$fd mixed File descriptor
$listenerMode boolean Listener mode?
$passphrase string Passphrase
$pid integer PID of process which bound this socket
$pkfile string Private key file
$pool PHPDaemon\Network\Pool Pool
$reuse boolean Reuse?
$revision integer Revision
$source string Source
$ssl mixed SSL
$tls mixed TLS
$uri string URI
$verifydepth integer Verify depth
$verifypeer boolean Verify peer?

Public Methods

Method Description
__construct ( $uri ) : object Constructor
__destruct ( ) : void Destructor
__toString ( ) : string toString handler
attachTo ( Pool $pool ) : void Attach to ConnectionPool
bindSocket ( ) : boolean Bind given addreess
close ( ) : void Close each of binded sockets.
disable ( ) : void Disable all events of sockets
enable ( ) : void Enable socket events
finish ( ) : void Finishes Generic
getPort ( ) : string | null Get port
getUri ( ) : string Get URI
netMatch ( $CIDR, $IP ) : boolean Checks if the CIDR-mask matches the IP
onAcceptEv ( EventListener $listener, $fd, $addrPort, $ctx )
setFd ( string $fd ) : void Route incoming request to related application

Protected Methods

Method Description
importParams ( ) : void Import parameters
initSecureContext ( ) : void Initialize SSL/TLS context
onBound ( ) : boolean | null Called when socket is bound

Method Details

__construct() public method

Constructor
public __construct ( $uri ) : object
return object

__destruct() public method

Destructor
public __destruct ( ) : void
return void

__toString() public method

toString handler
public __toString ( ) : string
return string

attachTo() public method

Attach to ConnectionPool
public attachTo ( Pool $pool ) : void
$pool PHPDaemon\Network\Pool
return void

bindSocket() abstract public method

Bind given addreess
abstract public bindSocket ( ) : boolean
return boolean Success.

close() public method

Close each of binded sockets.
public close ( ) : void
return void

disable() public method

Disable all events of sockets
public disable ( ) : void
return void

enable() public method

Enable socket events
public enable ( ) : void
return void

finish() public method

Finishes Generic
public finish ( ) : void
return void

getPort() public method

Get port
public getPort ( ) : string | null
return string | null

getUri() public method

Get URI
public getUri ( ) : string
return string

importParams() protected method

Import parameters
protected importParams ( ) : void
return void

initSecureContext() protected method

Initialize SSL/TLS context
protected initSecureContext ( ) : void
return void

netMatch() public static method

Checks if the CIDR-mask matches the IP
public static netMatch ( $CIDR, $IP ) : boolean
return boolean Result

onAcceptEv() public method

public onAcceptEv ( EventListener $listener, $fd, $addrPort, $ctx )
$listener EventListener
$fd
$addrPort
$ctx

onBound() protected method

Called when socket is bound
protected onBound ( ) : boolean | null
return boolean | null Success

setFd() public method

Route incoming request to related application
public setFd ( string $fd ) : void
$fd string
return void

Property Details

$allowselfsigned protected_oe property

Allow self-signed?
protected bool $allowselfsigned
return boolean

$cafile protected_oe property

CA file
protected string $cafile
return string

$certfile protected_oe property

Certificate file
protected string $certfile
return string

$ctx protected_oe property

Context
protected mixed $ctx
return mixed

$ctxname protected_oe property

Context name
protected string $ctxname
return string

$enabled protected_oe property

Enabled?
protected bool $enabled
return boolean

$erroneous protected_oe property

Erroneous?
protected bool $erroneous
return boolean

$ev protected_oe property

Event
protected Event,EventListener $ev
return EventListener\Event

$fd protected_oe property

File descriptor
protected mixed $fd
return mixed

$listenerMode protected_oe property

Listener mode?
protected bool $listenerMode
return boolean

$passphrase protected_oe property

Passphrase
protected string $passphrase
return string

$pid protected_oe property

PID of process which bound this socket
protected int $pid
return integer

$pkfile protected_oe property

Private key file
protected string $pkfile
return string

$pool protected_oe property

Pool
protected Pool,PHPDaemon\Network $pool
return PHPDaemon\Network\Pool

$reuse protected_oe property

Reuse?
protected bool $reuse
return boolean

$revision protected_oe property

Revision
protected int $revision
return integer

$source protected_oe property

Source
protected string $source
return string

$ssl protected_oe property

SSL
protected mixed $ssl
return mixed

$tls protected_oe property

TLS
protected mixed $tls
return mixed

$uri protected_oe property

URI
protected string $uri
return string

$verifydepth protected_oe property

Verify depth
protected int $verifydepth
return integer

$verifypeer protected_oe property

Verify peer?
protected bool $verifypeer
return boolean