Öffentliche Methoden | |
| __construct ($socket) | |
| Default constructor. | |
| __destruct () | |
| Destructor. | |
| getSocket () | |
| Returns socket. | |
| isConnected () | |
| isListening () | |
| connect ($address, $port) | |
| Connects to a specified address. | |
| bind ($address, $port) | |
| Binds the socket to an address + port. | |
| listen () | |
| Let's the socket listen for incoming connections. | |
| hasBeenAccepted () | |
| Tells the SocketHandler that he got accepted. | |
| accept () | |
| Accepts a connection to a socket that is bound and listens The ressource has to be added to the SocketPool manually. | |
| getRemoteName () | |
| Returns ip + port of the remote socket. | |
| getLocalName () | |
| Returns ip + port of the local socket. | |
| write ($data) | |
| Writes data to the socket. | |
| read ($length=16384) | |
| Reads data from the socket. | |
| close () | |
| Shuts the socket down after waiting a bit (waiting might be optional). | |
Geschützte Methoden | |
| error () | |
| Gets last error from socket. | |
Geschützte Attribute | |
| $socket | |
| $is_connected | |
| $is_bound | |
| $is_listening | |
Definiert in Zeile 8 der Datei SocketHandler.php.
| Socket_SocketHandler.__construct | ( | $ | socket | ) |
Default constructor.
Sets the socket.
| Exception_SocketException |
| ressource | $socket |
Definiert in Zeile 37 der Datei SocketHandler.php.
| Socket_SocketHandler.__destruct | ( | ) |
Destructor.
Closes socket.
Definiert in Zeile 49 der Datei SocketHandler.php.
Benutzt close().

| Socket_SocketHandler.accept | ( | ) |
Accepts a connection to a socket that is bound and listens The ressource has to be added to the SocketPool manually.
| Exception_SocketException |
Definiert in Zeile 131 der Datei SocketHandler.php.
Benutzt error().

| Socket_SocketHandler.bind | ( | $ | address, | |
| $ | port | |||
| ) |
Binds the socket to an address + port.
| Exception_SocketException |
| string | $address | |
| int | $port |
Definiert in Zeile 96 der Datei SocketHandler.php.
Benutzt error().

| Socket_SocketHandler.close | ( | ) |
Shuts the socket down after waiting a bit (waiting might be optional).
| Exception_SocketException |
Definiert in Zeile 191 der Datei SocketHandler.php.
Benutzt error().
Wird benutzt von __destruct().


| Socket_SocketHandler.connect | ( | $ | address, | |
| $ | port | |||
| ) |
Connects to a specified address.
| Exception_SocketException |
| string | $address | |
| int | $port |
Definiert in Zeile 82 der Datei SocketHandler.php.
Benutzt error().

| Socket_SocketHandler.error | ( | ) | [protected] |
Gets last error from socket.
| Exception_SocketException |
Definiert in Zeile 208 der Datei SocketHandler.php.
Wird benutzt von accept(), bind(), close(), connect(), getLocalName(), getRemoteName(), listen(), read() und write().

| Socket_SocketHandler.getLocalName | ( | ) |
Returns ip + port of the local socket.
| Exception_SocketException |
Definiert in Zeile 156 der Datei SocketHandler.php.
Benutzt error().

| Socket_SocketHandler.getRemoteName | ( | ) |
Returns ip + port of the remote socket.
| Exception_SocketException |
Definiert in Zeile 144 der Datei SocketHandler.php.
Benutzt error().

| Socket_SocketHandler.getSocket | ( | ) |
| Socket_SocketHandler.hasBeenAccepted | ( | ) |
Tells the SocketHandler that he got accepted.
Definiert in Zeile 121 der Datei SocketHandler.php.
| Socket_SocketHandler.isConnected | ( | ) |
Definiert in Zeile 64 der Datei SocketHandler.php.
| Socket_SocketHandler.isListening | ( | ) |
Definiert in Zeile 71 der Datei SocketHandler.php.
| Socket_SocketHandler.listen | ( | ) |
Let's the socket listen for incoming connections.
| Exception_SocketException |
Definiert in Zeile 110 der Datei SocketHandler.php.
Benutzt error().

| Socket_SocketHandler.read | ( | $ | length = 16384 |
) |
Reads data from the socket.
| Exception_SocketException |
| int | $length |
Definiert in Zeile 180 der Datei SocketHandler.php.
Benutzt error().

| Socket_SocketHandler.write | ( | $ | data | ) |
Writes data to the socket.
| Exception_SocketException |
| string | $data |
Definiert in Zeile 169 der Datei SocketHandler.php.
Benutzt error().

1.7.1