How to get access to the raw file descriptor? #2187
Unanswered
KJTsanaktsidis
asked this question in
Q&A
Replies: 1 comment
-
Oh, I bet I need to wrap the tonic/tonic/src/transport/server/conn.rs Lines 11 to 58 in fc940ce |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Basically, I'm writing a gRPC protocol that will be used over a unix socket, and I want to use Linux's new
SO_PEERPIDFD
sockopt (https://lore.kernel.org/all/[email protected]/) to get a pidfd for the peer being communicated with.I think there are two things which need to be glued together to make that happen, but I can't quite figure out how to make it fit:
serve_with_incoming
to callgetsockopt(SO_PEERPIDFD)
on the unix sockets before passing them to tonic, and thenreq.extensions()
req.extensions()
Does anybody have any guidance to offer on what this "something" and "somewhere" are? Or am I going about this entirely the wrong way?
Beta Was this translation helpful? Give feedback.
All reactions