| [ Index ] |
PHP Cross Reference of Limb3 |
[Source view] [Print] [Project Stats]
base include file for SimpleTest
| Version: | $Id: socket.php 5999 2007-06-18 13:13:08Z pachanga $ |
| File Size: | 216 lines (7 kb) |
| Included or required: | 1 time |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
SimpleStickyError:: (5 methods):
SimpleStickyError()
isError()
getError()
_setError()
_clearError()
SimpleSocket:: (7 methods):
SimpleSocket()
write()
read()
isOpen()
close()
getSent()
_openSocket()
SimpleSecureSocket:: (2 methods):
SimpleSecureSocket()
_openSocket()
Class: SimpleStickyError - X-Ref
Stashes an error for later. Useful for constructors| SimpleStickyError() X-Ref |
| Sets the error to empty. |
| isError() X-Ref |
| Test for an outstanding error. return: boolean True if there is an error. |
| getError() X-Ref |
| Accessor for an outstanding error. return: string Empty string if no error otherwise |
| _setError($error) X-Ref |
| Sets the internal error. param: string Error message to stash. |
| _clearError() X-Ref |
| Resets the error state to no error. |
Class: SimpleSocket - X-Ref
Wrapper for TCP/IP socket.| SimpleSocket($host, $port, $timeout, $block_size = 255) X-Ref |
| Opens a socket for reading and writing. param: string $host Hostname to send request to. param: integer $port Port on remote machine to open. param: integer $timeout Connection timeout in seconds. param: integer $block_size Size of chunk to read. |
| write($message) X-Ref |
| Writes some data to the socket and saves alocal copy. param: string $message String to send to socket. return: boolean True if successful. |
| read() X-Ref |
| Reads data from the socket. The error suppresion is a workaround for PHP4 always throwing a warning with a secure socket. return: integer/boolean Incoming bytes. False |
| isOpen() X-Ref |
| Accessor for socket open state. return: boolean True if open. |
| close() X-Ref |
| Closes the socket preventing further reads. Cannot be reopened once closed. return: boolean True if successful. |
| getSent() X-Ref |
| Accessor for content so far. return: string Bytes sent only. |
| _openSocket($host, $port, &$error_number, &$error, $timeout) X-Ref |
| Actually opens the low level socket. param: string $host Host to connect to. param: integer $port Port on host. param: integer $error_number Recipient of error code. param: string $error Recipoent of error message. param: integer $timeout Maximum time to wait for connection. |
Class: SimpleSecureSocket - X-Ref
Wrapper for TCP/IP socket over TLS.| SimpleSecureSocket($host, $port, $timeout) X-Ref |
| Opens a secure socket for reading and writing. param: string $host Hostname to send request to. param: integer $port Port on remote machine to open. param: integer $timeout Connection timeout in seconds. |
| _openSocket($host, $port, &$error_number, &$error, $timeout) X-Ref |
| Actually opens the low level socket. param: string $host Host to connect to. param: integer $port Port on host. param: integer $error_number Recipient of error code. param: string $error Recipient of error message. param: integer $timeout Maximum time to wait for connection. |
| Generated: Sat Nov 22 03:48:54 2008 | Cross-referenced by PHPXref 0.7 |