Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EPOLLPRI when does this case happen?

Tags:

epoll

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?

like image 752
Jae Park Avatar asked May 21 '12 08:05

Jae Park


1 Answers

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).

like image 131
coredumped Avatar answered Oct 28 '22 01:10

coredumped