Hook Event After Accept

Antonio Nappa jeppojeps at gmail.com
Fri Sep 16 13:17:38 UTC 2016


I have a plugin doing the following:

- go through active connections and detect the one listening on a
particular port (e.g. 443)
- register a read event on a different fd that I got with dup(fd of
connection on 443) with a custom handler (I don't want to interrupt the
normal handshake just watch the data passing).

My issue is that when the event is fired there is no data to read on the
duped socket because the accept on the original one hasn't happened, how
can I register the event to fire up after the accept?
I have tried to restore the event in the handler but I got a file exists
error. I have also tried to have a while(1) waiting on the original
connection to become ready, but of course the while(1) is blocking so no
luck with that.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20160916/c566ff8b/attachment.html>

More information about the nginx-devel mailing list