Provide Attribute for i.n.c.unix.PeerCredentials when using EpollDomainSocketChannel
- Dominant language
- Java
- Stars
- 12.1k
- Forks
- 4k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 37
Description
Please answer these questions before submitting your issue.
### What version of gRPC are you using?
grpc 1.0.3
### What JVM are you using (`java -version`)?
java version "1.8.0_111"
### Feature Request
We'd like to get access to the EpollDomainSocketChannel to access method peerCredentials() (new in Netty release 4.1.7) from within a gRPC server's BindableService call.
We're using gRPC with Unix Domain Sockets (Netty's EpollServerDomainSocketChannel) on a server to manage a hardware resource. We allow a single user (but multiple processes) to open the resource more than once, but we need to reserve the resource while that user has it open and not allow any other users access to the device. Our server needs to be resilient and detect that the client program has potentially crashed and allow the resource to be cleaned up and made available for another user.
We can add a ServerInterceptor but still I haven't figured out to get the Channel.
Can we get access from a ServerCall object to the Channel (understanding that it may be null for an Inprocess server)? Or other alternatives?
Contributor guide
Assessment
This issue has not been assessed yet.