Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "urgent data"?

Tags:

c

epoll

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?

like image 383
user206268 Avatar asked Mar 31 '10 17:03

user206268


2 Answers

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.

like image 121
Daniel Stutzbach Avatar answered Sep 19 '22 05:09

Daniel Stutzbach


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.

like image 40
Jakob Borg Avatar answered Sep 21 '22 05:09

Jakob Borg