6

When I set my epoll option, I can see EPOLLPRI.

It expalins there is urgent "read" required.

When does this actually occur?

Is there any way to send in that PRI Mode?

1 Answer 1

7

EPOLLPRI in epoll(7) as well as POLLPRI in poll(2) is used to receive these urgent data.

Sometimes it's necessary to send high-priority (urgent) data over a connection that may have unread low-priority data at the other end. For example, a user interface process may be interpreting commands and sending them on to another process through a stream connection. The user interface may have filled the stream with as yet unprocessed requests when the user types a command to cancel all outstanding requests. Rather than have the high-priority data wait to be processed after the low-priority data, you can have it sent as out-of-band (OOB) data or urgent data.

A Socket-based IPC Tutorial

To send OOB specify MSG_OOB flag in send(2).

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.