Class JnrUnixSocketHelper


  • public final class JnrUnixSocketHelper
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private JnrUnixSocketHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int getUid​(java.nio.channels.SocketChannel _sock)
      Get the UID of peer credentials.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JnrUnixSocketHelper

        private JnrUnixSocketHelper()
    • Method Detail

      • getUid

        public static int getUid​(java.nio.channels.SocketChannel _sock)
                          throws java.io.IOException
        Get the UID of peer credentials.
        Parameters:
        _sock - socket to read from
        Returns:
        UID, -1 if given SocketChannel was null
        Throws:
        java.io.IOException - when socket channel fails to read SO_PEERCRED option