[ Index ] |
|
Code source de PRADO 3.0.6 |
[Code source] [Imprimer] [Statistiques]
base include file for SimpleTest
Version: | $Id: socket.php 1397 2006-09-07 07:55:53Z wei $ |
Poids: | 216 lignes (7 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
SimpleStickyError:: (5 méthodes):
SimpleStickyError()
isError()
getError()
_setError()
_clearError()
SimpleSocket:: (7 méthodes):
SimpleSocket()
write()
read()
isOpen()
close()
getSent()
_openSocket()
SimpleSecureSocket:: (2 méthodes):
SimpleSecureSocket()
_openSocket()
Classe: SimpleStickyError - X-Ref
Stashes an error for later. Useful for constructorsSimpleStickyError() 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. |
Classe: 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. |
Classe: 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. |
Généré le : Sun Feb 25 21:07:04 2007 | par Balluche grâce à PHPXref 0.7 |