c - epoll: What is appropriate behavior, when I get EPOLLOUT and EPOLLHUP in the same event? -


first time epoll() user. i'm using epoll write simple http client, connect nginx web server on host control.

here sequence of events looking at

  1. i shutdown (server) host
  2. i start client, socket(), epoll_create1(), epoll_ctl(), connect(), epoll_wait(epollout) believe correct
  3. i startup host
  4. once web server starts up, epoll_wait() completes , returns 1 event.

usually, event returned epoll_wait() epollout. however, every 5th try or so, epollout|epollhup. , i'm not sure do.

is proper nginx? epollout|epollhup make sense? should ignore epollhup, , send() data , check return value? feels strange ignore hup ... new epoll , know stuff happens time.

all want client do, send plain ole http request, , recv response.

thanks!

edit

completely rewrote question since initial posting. if not so-approved, apologies.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -