Package jnr.unixsocket
Class UnixDatagramChannel
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ByteChannel
,Channel
,GatheringByteChannel
,InterruptibleChannel
,MulticastChannel
,NetworkChannel
,ReadableByteChannel
,ScatteringByteChannel
,WritableByteChannel
,jnr.enxio.channels.NativeSelectableChannel
-
Method Summary
Modifier and TypeMethodDescriptionbind
(SocketAddress local) connect
(SocketAddress remote) connect
(UnixSocketAddress remote) final UnixSocketAddress
<T> T
getOption
(SocketOption<T> name) final UnixSocketAddress
boolean
join
(InetAddress group, NetworkInterface interf) join
(InetAddress group, NetworkInterface interf, InetAddress source) static final UnixDatagramChannel
open()
static final UnixDatagramChannel
open
(jnr.constants.platform.ProtocolFamily domain, int protocol) static final UnixDatagramChannel[]
pair()
int
read
(ByteBuffer dst) receive
(ByteBuffer src) int
send
(ByteBuffer src, SocketAddress target) <T> DatagramChannel
setOption
(SocketOption<T> name, T value) socket()
final Set<SocketOption<?>>
int
write
(ByteBuffer src) long
write
(ByteBuffer[] srcs, int offset, int length) Methods inherited from class jnr.unixsocket.impl.AbstractNativeDatagramChannel
getFD, implCloseSelectableChannel, implConfigureBlocking, read, setFD
Methods inherited from class java.nio.channels.DatagramChannel
open, read, validOps, write
Methods inherited from class java.nio.channels.spi.AbstractSelectableChannel
blockingLock, configureBlocking, implCloseChannel, isBlocking, isRegistered, keyFor, provider, register
Methods inherited from class java.nio.channels.SelectableChannel
register
Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
begin, close, end, isOpen
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.nio.channels.MulticastChannel
close
-
Method Details
-
open
- Throws:
IOException
-
open
public static final UnixDatagramChannel open(jnr.constants.platform.ProtocolFamily domain, int protocol) throws IOException - Throws:
IOException
-
pair
- Throws:
IOException
-
bind
- Specified by:
bind
in interfaceNetworkChannel
- Specified by:
bind
in classDatagramChannel
- Throws:
IOException
-
connect
-
disconnect
- Specified by:
disconnect
in classDatagramChannel
- Throws:
IOException
-
isConnected
public boolean isConnected()- Specified by:
isConnected
in classDatagramChannel
-
getRemoteSocketAddress
-
getLocalSocketAddress
-
receive
- Specified by:
receive
in classDatagramChannel
- Throws:
IOException
-
send
- Specified by:
send
in classDatagramChannel
- Throws:
IOException
-
connect
- Specified by:
connect
in classDatagramChannel
- Throws:
IOException
-
socket
- Specified by:
socket
in classDatagramChannel
-
write
- Specified by:
write
in interfaceGatheringByteChannel
- Overrides:
write
in classAbstractNativeDatagramChannel
- Throws:
IOException
-
read
- Specified by:
read
in interfaceReadableByteChannel
- Overrides:
read
in classAbstractNativeDatagramChannel
- Throws:
IOException
-
write
- Specified by:
write
in interfaceWritableByteChannel
- Overrides:
write
in classAbstractNativeDatagramChannel
- Throws:
IOException
-
getRemoteAddress
- Specified by:
getRemoteAddress
in classDatagramChannel
- Throws:
IOException
-
getLocalAddress
- Specified by:
getLocalAddress
in interfaceNetworkChannel
- Specified by:
getLocalAddress
in classDatagramChannel
- Throws:
IOException
-
supportedOptions
-
getOption
- Throws:
IOException
-
setOption
- Specified by:
setOption
in interfaceNetworkChannel
- Specified by:
setOption
in classDatagramChannel
- Throws:
IOException
-
join
-
join
-