Class NativeUnixSocketHelper

java.lang.Object
org.freedesktop.dbus.transport.jre.NativeUnixSocketHelper

public final class NativeUnixSocketHelper extends Object
  • Method Details

    • getUid

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