We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
In classical inetd activation, inetd already "Accept"s the incoming connection from client, and then passes the accepted connection to the daemon.
In that case I need to bypass the Accept() call that happens in the Serve() method (server.go line 83).
Unfortunately the handleConn method is private, so I can't call it directly.
Hence my very small feature request: rname handleConn to HandleConn :)
Thanks, Stephane
The text was updated successfully, but these errors were encountered:
Oh, and newConn too !
Sorry, something went wrong.
How is this handled with e.g. net/http?
net/http
That's a very good question indeed.
I don't think that net/http has any special to handle inetd services.
But that pointed me in the right direction: wrap net.Listener and net.Conn to make the Accept() call a no-op.
https://gist.github.com/stephane-martin/57a19466633b7ce712945aaed7a0e751
Please be free to comment/propose something else!
Does this work? If so, this seems like a better idea.
No branches or pull requests
Hello,
In classical inetd activation, inetd already "Accept"s the incoming connection from client, and then passes the accepted connection to the daemon.
In that case I need to bypass the Accept() call that happens in the Serve() method (server.go line 83).
Unfortunately the handleConn method is private, so I can't call it directly.
Hence my very small feature request: rname handleConn to HandleConn :)
Thanks,
Stephane
The text was updated successfully, but these errors were encountered: