Public Types | |
typedef JetByteTools::Core::IQueueTimers::UserData | UserData |
User data that can be passed to the TimerCallback::OnTimer() call. | |
Public Member Functions | |
CReadTimeoutDatagramSocketConnectionFilter (IAcceptDatagramSocketConnectionFilters &manager, JetByteTools::Core::IQueueTimers &timerQueue) | |
Installs the connection filter on all connections made by the supplied manager and queues timers using the supplied timer queue. | |
CReadTimeoutDatagramSocketConnectionFilter (const CReadTimeoutDatagramSocketConnectionFilter &rhs) | |
CReadTimeoutDatagramSocketConnectionFilter & | operator= (const CReadTimeoutDatagramSocketConnectionFilter &rhs) |
void | SetupReadTimeout (IDatagramSocket &socket, Milliseconds timeout, TimerCallback &timerCallback, UserData userData=0) const |
Sets up a read timeout for the socket. The timeout will be set after every read is issued on the socket. Note that the timeout is NOT set until the next read is issued. | |
void | SetReadTimeout (IDatagramSocket &socket, Milliseconds timeout, TimerCallback &timerCallback, UserData userData=0) |
Sets a read timeout on the socket. The timeout will be set after every read is issued on the socket. Note that the timeout is set straight away but will be reset when the next read is issued. | |
void | SetSingleReadTimeout (IDatagramSocket &socket, Milliseconds timeout, TimerCallback &timerCallback, UserData userData=0) |
Sets a single read timeout on the socket. This can be used to set a different timeout to the 'default' timeout that is set with all read operations. Note that there's only one timeout per socket and setting this timeout cancels any pending 'default' read timeout that may have been set when the last read was issued. Usually called from the TimerCallback::OnTimer() handler to set an additional timeout after the 'default' timeout has expired. Note that the timer is started NOW and not when the next read is issued. | |
void | CancelReadTimeout (IDatagramSocket &socket) const |
Cancels any pending timeouts and prevents any more timeouts being set for any subsequent read operations on the supplied socket. | |
void | CancelPendingTimeout (IDatagramSocket &socket) const |
Cancels any pending timeouts on the supplied socket. | |
Classes | |
class | TimerCallback |
User data that can be passed to the TimerCallback::OnTimer() call.
Reimplemented from IQueueTimers::Timer.
CReadTimeoutDatagramSocketConnectionFilter | ( | IAcceptDatagramSocketConnectionFilters & | manager, | |
JetByteTools::Core::IQueueTimers & | timerQueue | |||
) |
Installs the connection filter on all connections made by the supplied manager and queues timers using the supplied timer queue.
CReadTimeoutDatagramSocketConnectionFilter | ( | const CReadTimeoutDatagramSocketConnectionFilter & | rhs | ) |
CReadTimeoutDatagramSocketConnectionFilter& operator= | ( | const CReadTimeoutDatagramSocketConnectionFilter & | rhs | ) |
void SetupReadTimeout | ( | IDatagramSocket & | socket, | |
Milliseconds | timeout, | |||
TimerCallback & | timerCallback, | |||
UserData | userData = 0 | |||
) | const |
Sets up a read timeout for the socket. The timeout will be set after every read is issued on the socket. Note that the timeout is NOT set until the next read is issued.
void SetReadTimeout | ( | IDatagramSocket & | socket, | |
Milliseconds | timeout, | |||
TimerCallback & | timerCallback, | |||
UserData | userData = 0 | |||
) |
Sets a read timeout on the socket. The timeout will be set after every read is issued on the socket. Note that the timeout is set straight away but will be reset when the next read is issued.
void SetSingleReadTimeout | ( | IDatagramSocket & | socket, | |
Milliseconds | timeout, | |||
TimerCallback & | timerCallback, | |||
UserData | userData = 0 | |||
) |
Sets a single read timeout on the socket. This can be used to set a different timeout to the 'default' timeout that is set with all read operations. Note that there's only one timeout per socket and setting this timeout cancels any pending 'default' read timeout that may have been set when the last read was issued. Usually called from the TimerCallback::OnTimer() handler to set an additional timeout after the 'default' timeout has expired. Note that the timer is started NOW and not when the next read is issued.
void CancelReadTimeout | ( | IDatagramSocket & | socket | ) | const |
Cancels any pending timeouts and prevents any more timeouts being set for any subsequent read operations on the supplied socket.
void CancelPendingTimeout | ( | IDatagramSocket & | socket | ) | const |
Cancels any pending timeouts on the supplied socket.