Method |
Description |
|
__construct ( array $options = [] ) |
|
|
close ( ) |
Close the connection to the host. |
|
connect ( string $host, integer $port, integer $timeout = 1 ) : boolean |
Connect to the host on the port defined for this TCP socket. |
|
enableEncryption ( integer $cryptoMethod = null ) : boolean |
Enable encryption for the socket connection. |
|
getParams ( ) : array |
Get parameter/option information from the TCP socket stream/context. |
|
read ( integer $length ) |
Read data from the TCP socket. |
|
setOperationTimeout ( integer $timeout ) : boolean |
Sets the timeout (in seconds) for TCP operations (not the initial connection attempt). |
|
write ( mixed $data ) : integer |
Write data to the TCP socket. |
|