Inheritance diagram for CakeSocket:

Public Member Functions | |
| __construct ($config=array()) | |
| __destruct () | |
| abort () | |
| address () | |
| addresses () | |
| connect () | |
| disconnect () | |
| host () | |
| lastError () | |
| read ($length=1024) | |
| reset ($state=null) | |
| setLastError ($errNum, $errStr) | |
| write ($data) | |
Public Attributes | |
| $_baseConfig | |
| $config = array() | |
| $connected = false | |
| $connection = null | |
| $description = 'Remote DataSource Network Socket Interface' | |
| $lastError = array() | |
Definition at line 34 of file socket.php.
| CakeSocket::__construct | ( | $ | config = array() |
) |
Constructor.
| array | $config Socket configuration, which will be merged with the base configuration |
Reimplemented in HttpSocket.
Definition at line 88 of file socket.php.
References $config, __construct(), and config().
| CakeSocket::__destruct | ( | ) |
Destructor, used to disconnect from current connection.
private
Definition at line 267 of file socket.php.
References disconnect().
| CakeSocket::abort | ( | ) |
| CakeSocket::address | ( | ) |
Get the IP address of the current connection.
Definition at line 149 of file socket.php.
References config(), host(), and Validation::ip().
Referenced by host().
| CakeSocket::addresses | ( | ) |
Get all IP addresses associated with the current connection.
Definition at line 162 of file socket.php.
References config(), host(), and Validation::ip().
| CakeSocket::connect | ( | ) |
Connect the socket to the given host and port.
Definition at line 102 of file socket.php.
References config(), disconnect(), host(), and setLastError().
| CakeSocket::disconnect | ( | ) |
Disconnect the socket from the current connection.
Definition at line 250 of file socket.php.
Referenced by __destruct(), connect(), and HttpSocket::request().
| CakeSocket::host | ( | ) |
Get the host name of the current connection.
Definition at line 136 of file socket.php.
References address(), config(), and Validation::ip().
Referenced by address(), addresses(), HttpSocket::buildUri(), HttpSocket::configUri(), connect(), HttpSocket::request(), and HttpSocket::url().
| CakeSocket::lastError | ( | ) |
Get the last error as a string.
Definition at line 175 of file socket.php.
Referenced by setLastError().
| CakeSocket::read | ( | $ | length = 1024 |
) |
Read data from the socket. Returns false if no data is available or no connection could be established.
| integer | $length Optional buffer length to read; defaults to 1024 |
Definition at line 217 of file socket.php.
References __(), connect(), and setLastError().
Referenced by HttpSocket::request().
| CakeSocket::reset | ( | $ | state = null |
) |
Resets the state of this Socket instance to it's initial state (before Object::__construct got executed)
Reimplemented in HttpSocket.
Definition at line 276 of file socket.php.
| CakeSocket::setLastError | ( | $ | errNum, | |
| $ | errStr | |||
| ) |
Set the last error.
| integer | $errNum Error code | |
| string | $errStr Error string public |
Definition at line 189 of file socket.php.
References lastError().
| CakeSocket::write | ( | $ | data | ) |
Write data to the socket.
| string | $data The data to write to the socket |
Definition at line 199 of file socket.php.
References connect().
Referenced by HttpSocket::request().
| CakeSocket::$_baseConfig |
Initial value:
array(
'persistent' => false,
'host' => 'localhost',
'protocol' => 'tcp',
'port' => 80,
'timeout' => 30
)
Definition at line 48 of file socket.php.
| CakeSocket::$config = array() |
| CakeSocket::$connected = false |
Definition at line 75 of file socket.php.
| CakeSocket::$connection = null |
Definition at line 68 of file socket.php.
| CakeSocket::$description = 'Remote DataSource Network Socket Interface' |
| CakeSocket::$lastError = array() |
Definition at line 82 of file socket.php.
1.4.7