tags:

views:

57

answers:

2

The man page of epoll_ctl() says about EPOLLPRI:

There is urgent data available for read(2) operations.

How exactly is "urgent data" defined and who decides which data has priority?

+1  A: 

A TCP packet can contain data marked as 'urgent'. This is OOB data, separate from the normal data stream. See, for example, the wikipedia article on this. As the article also notes, it's not commonly used, implementations vary, and relying on it would probably be foolish.

calmh
+3  A: 

TCP has a feature for sending out-of-band data, also known as urgent data. Normally, data in TCP is stream based; that is, the receiver reads data in the exact same order that the sender wrote the data. The sender may decide to send urgent data, which can skip the stream.

However, it has several implementation problems and very, very few protocols or programs use it (telnet is the only one I'm aware of). Essentially it's a relic and not used in modern programs.

Daniel Stutzbach