EPOLLPRI, when does this happen?

When I install my epoll version, I see EPOLLPRI.

This eliminates the need for urgent "reading."

When does this really happen?

Is there any way to send PRI in this mode?

+4
source share
1 answer

EPOLLPRI in epoll(7) as well as POLLPRI in poll(2) are used to obtain this urgent data.

Sometimes it is necessary to send high priority (urgent) data over a connection that may have unread data with low priority at the other end. For example, a user interface process can interpret commands and send them to another process through a stream connection. The user interface may have populated a stream with outstanding requests when the user types a command to cancel all outstanding requests. Instead of waiting for high-priority data to be processed after low-priority data, you can send it as out-of-band (OOB) data or urgent data.

Socket Based IPC Tutorial

To send an OOB, specify the MSG_OOB flag send(2) .

+5
source

Source: https://habr.com/ru/post/1413491/


All Articles