프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_autoConfig | array | Auto config. | |
$_classes | array | The classes for the socket. | |
$_resource | resource | The resource for the current connection. |
메소드 | 설명 | |
---|---|---|
__construct ( array $config = [] ) : void | Constructor. | |
__destruct ( ) : void | Destructor. | |
close ( ) : boolean | Closes the socket and unsets Socket::$_resource. | |
encoding ( string $charset ) : boolean | Sets the encoding of the socket connection. | |
eof ( ) : boolean | Test for the end-of-file on the socket. | |
open ( array $options = [] ) : mixed | Opens the socket and sets Socket::$_resource. | |
read ( ) : object | Reads from the socket. | |
resource ( ) : resource | Returns the resource. | |
send ( |
Aggregates read and write methods into a coherent request response | |
set ( array $flags, array $value = null ) : void | Sets the options to be used in subsequent requests. | |
timeout ( integer $time ) : boolean | Sets the timeout on the socket *connection*. | |
write ( mixed $data ) : boolean | Writes data to the socket. |
public __construct ( array $config = [] ) : void | ||
$config | array | Available configuration options are: - `'persistent'`: Use a persistent connection (defaults to `false`). - `'protocol'`: Transfer protocol to use (defaults to `'tcp'`). - `'host'`: Host name or address (defaults to `'localhost'`). - `'login'`: Username for a login (defaults to `'root'`). - `'password'`: Password for a login (defaults to `''`). - `'port'`: Host port (defaults to `80`). - `'timeout'`: Seconds after opening the socket times out (defaults to `30`). |
리턴 | void |
public set ( array $flags, array $value = null ) : void | ||
$flags | array | If $values is an array, $flags will be used as the keys to an associative array of curl options. If $values is not set, then $flags will be used as the associative array. |
$value | array | If set, this array becomes the values for the associative array of curl options. |
리턴 | void |