Наши проекты:
Журнал · Discuz!ML · Wiki · DRKB · Помощь проекту |
||
ПРАВИЛА | FAQ | Помощь | Поиск | Участники | Календарь | Избранное | RSS |
[18.226.96.37] |
|
Сообщ.
#1
,
|
|
|
В poll.h есть флаги
#define POLLIN 0x001 /* There is data to read. */ #define POLLPRI 0x002 /* There is urgent data to read. */ #define POLLOUT 0x004 /* Writing now will not block. */ #if defined __USE_XOPEN || defined __USE_XOPEN2K8 /* These values are defined in XPG4.2. */ # define POLLRDNORM 0x040 /* Normal data may be read. */ # define POLLRDBAND 0x080 /* Priority data may be read. */ # define POLLWRNORM 0x100 /* Writing now will not block. */ # define POLLWRBAND 0x200 /* Priority data may be written. */ #endif #ifdef __USE_GNU /* These are extensions for Linux. */ # define POLLMSG 0x400 # define POLLREMOVE 0x1000 # define POLLRDHUP 0x2000 #endif /* Event types always implicitly polled for. These bits need not be set in `events', but they will appear in `revents' to indicate the status of the file descriptor. */ #define POLLERR 0x008 /* Error condition. */ #define POLLHUP 0x010 /* Hung up. */ #define POLLNVAL 0x020 /* Invalid polling request. */ POLLIN понятно , а что значит POLLRDNORM , POLLPRI? POLLRDBAND? что значит urgent data ? Priority data ? , как это грамотно применять ? |
Сообщ.
#2
,
|
|
|
Цитата settler @ как это грамотно применять ? Для какой задачи? Приведи код или псевдокод, и преследуемую цель! |
Сообщ.
#3
,
|
|
|
Цитата settler @ что значит urgent data Насчет этого можно сказать совершенно точно - в полученном TCP-сегменте присутствует байт срочных данных - в заголовке сегмента используется флаг URG - urgent data. Почитать о его применении можно у Стивенса Стивенс У.Р. UNIX: разработка сетевых приложений СПБ.: Питер, 2003 Приоритетные данные можно почитать здесь: http://orc.csres.utexas.edu/documentation/...ioritypoll.html Про остальное вот здесь: https://www.ibm.com/support/knowledgecenter...2/cpp_poll.html |