netty5/transport-native-epoll/src/test/java/io/netty/channel
Demetrius b3fa976028 Added support to fetch the UID, GID, and PID of the connected unix domain socket (EG: SO_PEERCREDS)
Motivation:

I had a need to know the user credentials of a connected unix domain socket.

Modifications:

Added a class to encapsulate user credentials (UID, GID, and the PID).
Augemented the Socket class to provide the JNI native interface to return this new class
Augemented the c code to call getSockOpts passing <a href=http://man7.org/linux/man-pages/man7/socket.7.html>SO_PEERCRED</a>
Then surfaced the ability to get user credentials in the EpollDomainSocketChannel

Result:

The EpollDomainSocketChannel now has a the following function signature:
public PeerCredentials peerCredentials() throws IOException allowing a caller to get the UID, GID, and PID of the linux process
connected to the unix domain socket.
2016-11-04 07:27:30 +01:00
..
epoll Make NIO and EPOLL transport connect errors more consistent with the JDK 2016-08-27 20:57:36 +02:00
unix Added support to fetch the UID, GID, and PID of the connected unix domain socket (EG: SO_PEERCREDS) 2016-11-04 07:27:30 +01:00