Welcome! Log In Create A New Profile

Advanced

Hook Event After Accept

Antonio Nappa
September 16, 2016 09:18AM
Hello,

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.

Thanks
Jeppo
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Hook Event After Accept

Antonio Nappa 340 September 16, 2016 09:18AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 114
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready