Interface class for notification of open/close on sockets.
More...
#include <tsSocketHandlerInterface.h>
Interface class for notification of open/close on sockets.
All methods are empty by default. An application may implement the required ones only.
◆ handleSocketOpenStart()
| virtual void ts::SocketHandlerInterface::handleSocketOpenStart |
( |
Socket & |
sock | ) |
|
|
virtual |
Called when a socket is about to be opened.
Never called when the application tries to open a socket which is already open.
- Parameters
-
| [in,out] | sock | Socket for which the handler is invoked. |
◆ handleSocketOpenComplete()
| virtual void ts::SocketHandlerInterface::handleSocketOpenComplete |
( |
Socket & |
sock, |
|
|
bool |
success |
|
) |
| |
|
virtual |
Called after a socket is opened (or failed to open).
- Parameters
-
| [in,out] | sock | Socket for which the handler is invoked. |
| [in] | success | True if the open was successful, false if the open failed. In case of error, the socket shall be considered as closed. |
◆ handleSocketConnected()
| virtual void ts::SocketHandlerInterface::handleSocketConnected |
( |
TCPConnection & |
sock | ) |
|
|
virtual |
Called when a TCP socket is successfully connected.
- Parameters
-
| [in,out] | sock | Socket for which the handler is invoked. |
Reimplemented in ts::TLVStream.
◆ handleSocketDisconnected()
| virtual void ts::SocketHandlerInterface::handleSocketDisconnected |
( |
TCPConnection & |
sock, |
|
|
bool |
silent |
|
) |
| |
|
virtual |
Called when a TCP socket is disconnected.
- Parameters
-
| [in,out] | sock | Socket for which the handler is invoked. |
| [in] | silent | Same value as passed to disconnect() or close(). |
◆ handleSocketCloseStart()
| virtual void ts::SocketHandlerInterface::handleSocketCloseStart |
( |
Socket & |
sock, |
|
|
bool |
silent |
|
) |
| |
|
virtual |
Called when a socket is about to be closed.
Never called when the application tries to close a socket which is not open.
- Parameters
-
| [in,out] | sock | Socket for which the handler is invoked. |
| [in] | silent | Same value as passed to close(). |
◆ handleSocketCloseComplete()
| virtual void ts::SocketHandlerInterface::handleSocketCloseComplete |
( |
Socket & |
sock, |
|
|
bool |
silent, |
|
|
bool |
success |
|
) |
| |
|
virtual |
Called after a socket is closed.
- Parameters
-
| [in,out] | sock | Socket for which the handler is invoked. |
| [in] | silent | Same value as passed to close(). |
| [in] | success | True if the close was successful, false if there was an error during the close. The socket shall be considered as closed on all cases, regardless of success. |
The documentation for this class was generated from the following file: