Top Constructors Methods
org.freedesktop.dbus.transport.jre

public final Class NativeUnixSocketHelper

extends Object
Class Inheritance
Imports
jdk.net.ExtendedSocketOptions, .UnixDomainPrincipal, java.io.IOException, java.nio.channels.SocketChannel, java.nio.file.attribute.UserPrincipal

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

UID, -1 if given SocketChannel was null
getUid
(SocketChannel
socket to read from
_sock
)

Get the UID of peer credentials.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NativeUnixSocketHelperback to summary
private NativeUnixSocketHelper()

Method Detail

getUidback to summary
public static int getUid(SocketChannel _sock) throws IOException

Get the UID of peer credentials.

Parameters
_sock:SocketChannel

socket to read from

Returns:int

UID, -1 if given SocketChannel was null

Exceptions
IOException:
when socket channel fails to read SO_PEERCRED option