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.

nginx-devel mailing list

Reply via email to