Enum srt_c::SRT_EPOLL_OPT
source[−]#[repr(C)]
pub enum SRT_EPOLL_OPT {
SRT_EPOLL_OPT_NONE,
SRT_EPOLL_IN,
SRT_EPOLL_OUT,
SRT_EPOLL_ERR,
SRT_EPOLL_UPDATE,
SRT_EPOLL_ET,
}Variants
SRT_EPOLL_OPT_NONE
SRT_EPOLL_IN
Ready for ‘recv’ operation:
-
For stream mode it means that at least 1 byte is available. In this mode the buffer may extract only a part of the packet, leaving next data possible for extraction later.
-
For message mode it means that there is at least one packet available (this may change in future, as it is desired that one full message should only wake up, not single packet of a not yet extractable message).
-
For live mode it means that there’s at least one packet ready to play.
-
For listener sockets, this means that there is a new connection waiting for pickup through the
srt_accept()call, that is, the next call tosrt_accept()will succeed without blocking (see an alias SRT_EPOLL_ACCEPT below).
SRT_EPOLL_OUT
Ready for ‘send’ operation.
-
For stream mode it means that there’s a free space in the sender buffer for at least 1 byte of data. The next send operation will only allow to send as much data as it is free space in the buffer.
-
For message mode it means that there’s a free space for at least one UDP packet. The edge-triggered mode can be used to pick up updates as the free space in the sender buffer grows.
-
For live mode it means that there’s a free space for at least one UDP packet. On the other hand, no readiness for OUT usually means an extraordinary congestion on the link, meaning also that you should immediately slow down the sending rate or you may get a connection break soon.
-
For non-blocking sockets used with
srt_connect*operation, this flag simply means that the connection was established.
SRT_EPOLL_ERR
The socket has encountered an error in the last operation and the next operation on that socket will end up with error. You can retry the operation, but getting the error from it is certain, so you may as well close the socket.
