Class UnixDatagramChannel
- All Implemented Interfaces:
Closeable, AutoCloseable, ByteChannel, Channel, GatheringByteChannel, InterruptibleChannel, MulticastChannel, NetworkChannel, ReadableByteChannel, ScatteringByteChannel, WritableByteChannel, jnr.enxio.channels.NativeSelectableChannel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class(package private) static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BindHandlerprivate UnixSocketAddressprivate UnixSocketAddressprivate UnixDatagramChannel.Stateprivate final ReadWriteLock -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate(package private)UnixDatagramChannel(int fd) (package private)UnixDatagramChannel(int fd, UnixDatagramChannel.State initialState, boolean initialBoundState) (package private)UnixDatagramChannel(int fd, UnixSocketAddress remote) (package private)UnixDatagramChannel(jnr.constants.platform.ProtocolFamily domain, int protocol) -
Method Summary
Modifier and TypeMethodDescriptionbind(SocketAddress local) connect(SocketAddress remote) connect(UnixSocketAddress remote) final UnixSocketAddress<T> TgetOption(SocketOption<T> name) final UnixSocketAddress(package private) booleanisBound()booleanjoin(InetAddress group, NetworkInterface interf) join(InetAddress group, NetworkInterface interf, InetAddress source) static final UnixDatagramChannelopen()static final UnixDatagramChannelopen(jnr.constants.platform.ProtocolFamily domain, int protocol) static final UnixDatagramChannel[]pair()intread(ByteBuffer dst) receive(ByteBuffer src) intsend(ByteBuffer src, SocketAddress target) <T> DatagramChannelsetOption(SocketOption<T> name, T value) socket()final Set<SocketOption<?>> intwrite(ByteBuffer src) longwrite(ByteBuffer[] srcs, int offset, int length) Methods inherited from class AbstractNativeDatagramChannel
getFD, implCloseSelectableChannel, implConfigureBlocking, read, setFDMethods inherited from class DatagramChannel
open, read, validOps, writeMethods inherited from class AbstractSelectableChannel
blockingLock, configureBlocking, implCloseChannel, isBlocking, isRegistered, keyFor, provider, registerMethods inherited from class SelectableChannel
registerMethods inherited from class AbstractInterruptibleChannel
begin, close, end, isOpenMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MulticastChannel
close
-
Field Details
-
state
-
remoteAddress
-
localAddress
-
stateLock
-
bindHandler
-
-
Constructor Details
-
UnixDatagramChannel
- Throws:
IOException
-
UnixDatagramChannel
UnixDatagramChannel(jnr.constants.platform.ProtocolFamily domain, int protocol) throws IOException - Throws:
IOException
-
UnixDatagramChannel
UnixDatagramChannel(int fd) -
UnixDatagramChannel
UnixDatagramChannel(int fd, UnixDatagramChannel.State initialState, boolean initialBoundState) -
UnixDatagramChannel
UnixDatagramChannel(int fd, UnixSocketAddress remote) throws IOException - Throws:
IOException
-
-
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:
bindin interfaceNetworkChannel- Specified by:
bindin classDatagramChannel- Throws:
IOException
-
connect
-
disconnect
- Specified by:
disconnectin classDatagramChannel- Throws:
IOException
-
isBound
boolean isBound() -
isConnected
public boolean isConnected()- Specified by:
isConnectedin classDatagramChannel
-
getRemoteSocketAddress
-
getLocalSocketAddress
-
receive
- Specified by:
receivein classDatagramChannel- Throws:
IOException
-
send
- Specified by:
sendin classDatagramChannel- Throws:
IOException
-
connect
- Specified by:
connectin classDatagramChannel- Throws:
IOException
-
socket
- Specified by:
socketin classDatagramChannel
-
write
- Specified by:
writein interfaceGatheringByteChannel- Overrides:
writein classAbstractNativeDatagramChannel- Throws:
IOException
-
read
- Specified by:
readin interfaceReadableByteChannel- Overrides:
readin classAbstractNativeDatagramChannel- Throws:
IOException
-
write
- Specified by:
writein interfaceWritableByteChannel- Overrides:
writein classAbstractNativeDatagramChannel- Throws:
IOException
-
getRemoteAddress
- Specified by:
getRemoteAddressin classDatagramChannel- Throws:
IOException
-
getLocalAddress
- Specified by:
getLocalAddressin interfaceNetworkChannel- Specified by:
getLocalAddressin classDatagramChannel- Throws:
IOException
-
supportedOptions
-
getOption
- Throws:
IOException
-
setOption
- Specified by:
setOptionin interfaceNetworkChannel- Specified by:
setOptionin classDatagramChannel- Throws:
IOException
-
join
-
join
-