Свойство | Тип | Описание | |
---|---|---|---|
$addr | Address | ||
$allowselfsigned | Allow self-signed? | ||
$bevConnectEnabled | Enable bevConnect? | ||
$certfile | Certificate file | ||
$connected | Connected? | ||
$contextCache | Context cache | ||
$contextCacheSize | Context cache size | ||
$dgram | Dgram connection? | ||
$failed | Failed? | ||
$host | Hostname | ||
$hostReal | Real host | ||
$keepalive | Keepalive? | ||
$locAddr | Local address | ||
$locPort | Local port | ||
$onConnected | Stack of callbacks called when connection is established | ||
$parentSocket | Parent socket | ||
$passphrase | Passphrase | ||
$password | Password | ||
$path | Path | ||
$pkfile | Private key file | ||
$port | Port number | ||
$scheme | Scheme | ||
$timeout | Timeout | ||
$type | Type | ||
$uri | URI information | ||
$user | User name | ||
$verifypeer | Verify peer? |
Метод | Описание | |
---|---|---|
__destruct ( ) : void | Destructor | |
__get ( string $name ) : mixed | Getter | |
close ( ) : void | Close the connection | |
connect ( string $url, callable $cb = null ) : boolean | Connects to URL | |
connectRaw ( string $host ) : boolean | Establish raw socket connection | |
connectTcp ( string $host, integer $port ) : boolean | Establish TCP connection | |
connectUdp ( string $host, integer $port ) : boolean | Establish UDP connection | |
connectUnix ( string $path ) : boolean | Establish UNIX socket connection | |
getHost ( ) : string | Get host | |
getPort ( ) : integer | Get port | |
getSocketName ( &$addr, &$port ) : void | Get socket name | |
getUrl ( ) : string | Get URL | |
isConnected ( ) : boolean | Connected? | |
onConnected ( callable $cb ) : void | Executes the given callback when/if the connection is handshaked | |
onFailure ( ) : void | Called when the connection failed to be established | |
onFailureEv ( EventBufferEvent $bev = null ) : void | Called when the connection failed | |
onFinish ( ) : void | Called when connection finishes | |
onInheritanceFromRequest ( Request $req ) : void | Called if we inherit connection from request | |
onReady ( ) : void | Called when the connection is handshaked (at low-level), and peer is ready to recv. data | |
onUdpPacket ( object $pct ) : void | Called when new UDP packet received | |
setDgram ( boolean $bool ) : void | Sets DGRAM mode | |
setKeepalive ( boolean $bool ) : void | Set keepalive | |
setOption ( integer $level, integer $optname, mixed $val ) : void | Set socket option | |
setParentSocket ( |
Sets parent socket | |
setPeername ( string $host, integer $port ) : void | Sets peer name | |
setTimeouts ( integer $read, integer $write ) : void | Set timeouts | |
write ( string $data ) : boolean | Send data to the connection. Note that it just writes to buffer that flushes at every baseloop |
Метод | Описание | |
---|---|---|
importParams ( ) | ||
initSSLContext ( ) : object | false | Initialize SSL context |
public connectRaw ( string $host ) : boolean | ||
$host | string | Hostname |
Результат | boolean | Success |
public connectUnix ( string $path ) : boolean | ||
$path | string | Path |
Результат | boolean | Success |
public getSocketName ( &$addr, &$port ) : void | ||
Результат | void |
protected initSSLContext ( ) : object | false | ||
Результат | object | false | Context |
public onConnected ( callable $cb ) : void | ||
$cb | callable | Callback |
Результат | void |
public onFailureEv ( EventBufferEvent $bev = null ) : void | ||
$bev | EventBufferEvent | |
Результат | void |
public onInheritanceFromRequest ( Request $req ) : void | ||
$req | Request | Parent Request |
Результат | void |
public onUdpPacket ( object $pct ) : void | ||
$pct | object | Packet |
Результат | void |
public setKeepalive ( boolean $bool ) : void | ||
$bool | boolean | |
Результат | void |
public setParentSocket ( |
||
$sock | ||
Результат | void |
protected static $contextCacheSize |
protected $onConnected |