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
- i shutdown (server) host
- i start client,
socket()
,epoll_create1()
,epoll_ctl()
,connect()
,epoll_wait(epollout)
believe correct - i startup host
- 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
Post a Comment