\SocketException.php
Wrapper for stream functionality.
This package provides data integrity to stream functionality, particularly useful for sockets.
PHP version 5
- Author
- Vasil Rangelov
- Category
- Net
- Copyright
- 2011 Vasil Rangelov
- License
- LGPL License 2.1
- Link
- http://netrouteros.sourceforge.net/
- Package
- PEAR2_Net_Transmitter
- Version
- 1.0.0a1
\PEAR2\Net\Transmitter\SocketException
Package: PEAR2\Net\Transmitter
Parameters
Returns
Returns
Returns
Exception thrown when something goes wrong with the connection.
- Implements
- \PEAR2\Net\Transmitter\Exception
- Parent(s)
- \RuntimeException
- Author
- Vasil Rangelov
- Category
- Net
- License
- LGPL License 2.1
- Link
- http://netrouteros.sourceforge.net/
Properties
Methods
__construct(
string $message
=
'', int $code
=
0, \PEAR2\Net\Transmitter\Exception $previous
=
null, int $error_no
=
null, string $error_str
=
null
)
:
void
Creates a new socket exception.
Name | Type | Description |
---|---|---|
$message | string | The Exception message to throw. |
$code | int | The Exception code. |
$previous | \PEAR2\Net\Transmitter\Exception | The previous exception used for the exception chaining. |
$error_no | int | If provided, holds the system level error number that occurred in the system-level connect() call. |
$error_str | string | The error message as a string. |
__toString(
)
:
string
Returns a string representation of the exception.
Type | Description |
---|---|
string | The exception as a string. |
getSocketErrorMessage(
)
:
string
Gets the error message of the last error on the socket.
Type | Description |
---|---|
string | The error message. |
getSocketErrorNumber(
)
:
int
Gets the error code of the last error on the socket.
Type | Description |
---|---|
int | NULL if none was provided or the number itself. |