Interface class for UDP operation Reactor handlers.
More...
#include <tsReactiveUDPHandlerInterface.h>
|
| virtual void | handleUDPClosed (ReactiveUDPSocket &sock) |
| | Handle the completion of closing a UDP socket.
|
| |
| virtual void | handleUDPReceive (ReactiveUDPSocket &sock, const ByteBlockPtr &data, const IPSocketAddress &sender, const IPSocketAddress &destination, cn::microseconds timestamp, UDPSocket::TimeStampType timestamp_type, int error_code) |
| | Handle the reception of a UDP datagram.
|
| |
| virtual void | handleUDPSend (ReactiveUDPSocket &sock, const void *data, size_t size, const IPSocketAddress &destination, int error_code) |
| | Handle the completion of a send operation on a UDP socket.
|
| |
Interface class for UDP operation Reactor handlers.
All methods are empty by default. An application may implement the required ones only.
◆ handleUDPSend()
| virtual void ts::ReactiveUDPHandlerInterface::handleUDPSend |
( |
ReactiveUDPSocket & |
sock, |
|
|
const void * |
data, |
|
|
size_t |
size, |
|
|
const IPSocketAddress & |
destination, |
|
|
int |
error_code |
|
) |
| |
|
virtual |
Handle the completion of a send operation on a UDP socket.
- Parameters
-
| [in,out] | sock | UDP socket for which the handler is invoked. |
| [in] | data | Address of the message which was sent. For information only. |
| [in] | size | Size in bytes of the sent message. For information only. |
| [in] | destination | Socket address of the destination. For information only. |
| [in] | error_code | System-specific error code, zero on success, SYS_ERROR in case of unknown error, SYS_CANCELED if the I/O was canceled before completion. |
◆ handleUDPReceive()
Handle the reception of a UDP datagram.
- Parameters
-
| [in,out] | sock | UDP socket for which the handler is invoked. |
| [in] | data | Safe pointer to the received data packet. |
| [in] | sender | Socket address of the sender. |
| [in] | destination | Socket address of the packet destination. Useful in multicast packets. |
| [in] | timestamp | Receive timestamp in micro-seconds. If the value is negative, no timestamp is available. |
| [in] | timestamp_type | Type of receive timestamp. |
| [in] | error_code | System-specific error code, zero on success, SYS_ERROR in case of unknown error. |
◆ handleUDPClosed()
| virtual void ts::ReactiveUDPHandlerInterface::handleUDPClosed |
( |
ReactiveUDPSocket & |
sock | ) |
|
|
virtual |
Handle the completion of closing a UDP socket.
An application closes a ReactiveUDPSocket using startClose() and this handler is called when the closing of the socket is complete. This is specifically important on operating systems with asynchronous I/O such as Windows. The application shall not call UDPSocket::close() and immediately consider the socket as done. If there are pending asynchronous I/O, the associated data buffers are still in use, until the cancelation of the these I/O are completed, after closing the socket. The application shall therefore wait for the handleUDPClosed() handler to destroy the data buffers and consider the socket as completely done.
- Parameters
-
| [in,out] | sock | UDP socket for which the handler is invoked. |
The documentation for this class was generated from the following file: