io.netty5.channel.socket.DatagramChannel that sends and receives an
AddressedEnvelope<ByteBuf, SocketAddress>.
io.netty5.channel.socket.DatagramChannel ,
NioDatagramChannel allows the following options in the option map:
ChannelOption |
INET |
INET6 |
{@code UNIX |
|---|---|---|---|
NioChannelOption | X | X | X |
AddressedEnvelope, DatagramPacket
| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | |
| private volatile boolean | |
| private static final SelectorProvider | |
| private static final String | |
| private final ProtocolFamily | |
| private volatile boolean | |
| private static final InternalLogger | |
| private Map | |
| private volatile boolean |
| Access | Constructor and Description |
|---|---|
| public | NioDatagramChannel(EventLoop eventLoop)
Create a new instance which will use the Operation Systems default |
| public | NioDatagramChannel(EventLoop eventLoop, SelectorProvider provider)
Create a new instance using the given |
| public | NioDatagramChannel(EventLoop eventLoop, ProtocolFamily family)
Create a new instance using the given |
| public | NioDatagramChannel(EventLoop eventLoop, SelectorProvider provider, ProtocolFamily family)
Create a new instance using the given |
| public | NioDatagramChannel(EventLoop eventLoop, DatagramChannel socket, ProtocolFamily family)
Create a new instance from the given |
| Modifier and Type | Method and Description |
|---|---|
| public Future | block(InetAddress
the multicast group address. multicastAddress, NetworkInterface the interface to use. networkInterface, InetAddress the source address. sourceToBlock)Implements io. |
| public Future | block(InetAddress
the multicast group address. multicastAddress, InetAddress the source address. sourceToBlock)Implements io. |
| protected void | doBind(SocketAddress
the localAddress)SocketAddress to bound to.Implements abstract io. Channel to the SocketAddress
|
| private void | |
| protected boolean | doConnect(SocketAddress
the address of the remote peer. remoteAddress, SocketAddress the local address of this channel. localAddress, Buffer the initial data that is written during connect
(if initialData)ChannelOption#TCP_FASTOPEN_CONNECT is supported and configured).
If data is written care must be taken to update the
reader offset.Implements abstract io. |
| protected void | doDisconnect()
Implements abstract io. Channel from its remote peer
|
| protected boolean | doFinishConnect(SocketAddress
the remote address of the peer. requestedRemoteAddress)Implements abstract io. |
| protected int | doReadMessages(AbstractChannel<Channel, SocketAddress, SocketAddress>.
Implements abstract io. |
| protected void | doShutdown(ChannelShutdownDirection
the direction to shut down. direction)Implements abstract io. Channel.
|
| protected void | doWriteNow(AbstractChannel<Channel, SocketAddress, SocketAddress>.
the writeSinkWriteSink that must be completed with the write
progress.
WriteSink#complete(long, long, int, boolean) or
WriteSink#complete(long, Throwable, boolean) must be called
exactly once before this method returns non-exceptional.Implements abstract io. false or there are
no more messages to write.
|
| protected Object | filterOutboundMessage(Object
the message to filter / convert. msg)Overrides io. AbstractChannel, so that
the Channel implementation converts the message to another.
|
| protected <T> T | getExtendedOption(ChannelOption<T>
the option)ChannelOption.Overrides io. ChannelOptions.
|
| private NetworkInterface | |
| public boolean | isActive()
Implements io. true if the Channel is active and so connected.
|
| private boolean | |
| private boolean | |
| public boolean | isConnected()
Implements io. true if the DatagramChannel is connected to the remote peer.
|
| protected boolean | isExtendedOptionSupported(ChannelOption<?>
the option)ChannelOption.Overrides io. ChannelOptions.
|
| public boolean | isShutdown(ChannelShutdownDirection direction)
Implements io. true if the ChannelShutdownDirection of the Channel was shutdown before.
|
| private static boolean | isSingleDirectBuffer(Buffer buf)
Checks if the specified buffer is a direct buffer and not composite. |
| protected DatagramChannel | |
| public Future | joinGroup(InetAddress
the multicast group address. multicastAddress)Implements io. Future once the operation completes.
|
| public Future | joinGroup(InetAddress
the multicast group address. multicastAddress, NetworkInterface the interface to use. networkInterface, InetAddress the source address (might be source)null).Implements io. Future
once the operation completes.
|
| public Future | leaveGroup(InetAddress
the multicast group address. multicastAddress)Implements io. Future once the operation completes.
|
| public Future | leaveGroup(InetAddress
the multicast group address. multicastAddress, NetworkInterface the interface to use. networkInterface, InetAddress the source address (might be source)null).Implements io. Future once the operation completes.
|
| protected SocketAddress | localAddress0()
Implements abstract io. SocketAddress which is bound locally.
|
| private NetworkInterface | |
| private static DatagramChannel | |
| private static DatagramChannel | |
| protected SocketAddress | remoteAddress0()
Implements abstract io. SocketAddress which the Channel is connected to.
|
| private void | |
| protected <T> void | setExtendedOption(ChannelOption<T>
the option, T value)ChannelOption.Overrides io. ChannelOptions.
|
| private int |
| activeOnOpen | back to summary |
|---|---|
| private volatile boolean activeOnOpen | |
| bound | back to summary |
|---|---|
| private volatile boolean bound | |
| DEFAULT_SELECTOR_PROVIDER | back to summary |
|---|---|
| private static final SelectorProvider DEFAULT_SELECTOR_PROVIDER | |
| EXPECTED_TYPES | back to summary |
|---|---|
| private static final String EXPECTED_TYPES | |
| family | back to summary |
|---|---|
| private final ProtocolFamily family | |
| inputShutdown | back to summary |
|---|---|
| private volatile boolean inputShutdown | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| memberships | back to summary |
|---|---|
| private Map<InetAddress, List<MembershipKey>> memberships | |
| outputShutdown | back to summary |
|---|---|
| private volatile boolean outputShutdown | |
| NioDatagramChannel | back to summary |
|---|---|
| public NioDatagramChannel(EventLoop eventLoop) Create a new instance which will use the Operation Systems default | |
| NioDatagramChannel | back to summary |
|---|---|
| public NioDatagramChannel(EventLoop eventLoop, SelectorProvider provider) Create a new instance using the given | |
| NioDatagramChannel | back to summary |
|---|---|
| public NioDatagramChannel(EventLoop eventLoop, ProtocolFamily family) Create a new instance using the given | |
| NioDatagramChannel | back to summary |
|---|---|
| public NioDatagramChannel(EventLoop eventLoop, SelectorProvider provider, ProtocolFamily family) Create a new instance using the given | |
| NioDatagramChannel | back to summary |
|---|---|
| public NioDatagramChannel(EventLoop eventLoop, DatagramChannel socket, ProtocolFamily family) Create a new instance from the given | |
| block | back to summary |
|---|---|
| public Future Implements io. Block the given sourceToBlock address for the given multicastAddress on the given networkInterface
| |
| block | back to summary |
|---|---|
| public Future Implements io. Block the given sourceToBlock address for the given multicastAddress
| |
| doBind | back to summary |
|---|---|
| protected void doBind(SocketAddress localAddress) throws Exception Implements abstract io. Doc from io. Bind the
| |
| doBind0 | back to summary |
|---|---|
| private void doBind0(SocketAddress localAddress) throws Exception | |
| doConnect | back to summary |
|---|---|
| protected boolean doConnect(SocketAddress remoteAddress, SocketAddress localAddress, Buffer initialData) throws Exception Implements abstract io. Doc from io. Connect to remote peer. This method should never be directly called.
| |
| doDisconnect | back to summary |
|---|---|
| protected void doDisconnect() throws Exception Implements abstract io. Doc from io. Disconnect this | |
| doFinishConnect | back to summary |
|---|---|
| protected boolean doFinishConnect(SocketAddress requestedRemoteAddress) Implements abstract io. Doc from io. Finish a connect request. This method should never be directly called, use
| |
| doReadMessages | back to summary |
|---|---|
| protected int doReadMessages(AbstractChannel<Channel, SocketAddress, SocketAddress>. Implements abstract io. Doc from io. Read messages into the given array and return the amount which was read.
| |
| doShutdown | back to summary |
|---|---|
| protected void doShutdown(ChannelShutdownDirection direction) Implements abstract io. Doc from io. Shutdown one direction of the
| |
| doWriteNow | back to summary |
|---|---|
| protected void doWriteNow(AbstractChannel<Channel, SocketAddress, SocketAddress>. Implements abstract io. Doc from io. Called in a loop when writes should be performed until this method returns
| |
| filterOutboundMessage | back to summary |
|---|---|
| protected Object filterOutboundMessage(Object msg) Overrides io. Doc from io. Invoked when a new message is added to to the outbound queue of this | |
| getExtendedOption | back to summary |
|---|---|
| protected <T> T getExtendedOption(ChannelOption<T> option) Overrides io. Doc from io. Override to add support for more
| |
| getNetworkInterface | back to summary |
|---|---|
| private NetworkInterface getNetworkInterface() | |
| isActive | back to summary |
|---|---|
| public boolean isActive() Implements io. Doc from io. Return
| |
| isActiveOnOpen | back to summary |
|---|---|
| private boolean isActiveOnOpen() | |
| isAnyLocalAddress | back to summary |
|---|---|
| private boolean isAnyLocalAddress() throws IOException | |
| isConnected | back to summary |
|---|---|
| public boolean isConnected() Implements io. Doc from io. Return
| |
| isExtendedOptionSupported | back to summary |
|---|---|
| protected boolean isExtendedOptionSupported(ChannelOption<?> option) Overrides io. Doc from io. Override to add support for more
| |
| isShutdown | back to summary |
|---|---|
| public boolean isShutdown(ChannelShutdownDirection direction) Implements io. Doc from io. Returns
| |
| isSingleDirectBuffer | back to summary |
|---|---|
| private static boolean isSingleDirectBuffer(Buffer buf) Checks if the specified buffer is a direct buffer and not composite. (We check this because otherwise we need to make it a non-composite buffer.) | |
| javaChannel | back to summary |
|---|---|
| protected DatagramChannel javaChannel() Overrides io.
| |
| joinGroup | back to summary |
|---|---|
| public Future Implements io. Doc from io. Joins a multicast group and notifies the
If the underlying implementation does not support this operation it will return a
| |
| joinGroup | back to summary |
|---|---|
| public Future Implements io. Doc from io. Joins the specified multicast group at the specified interface and notifies the
If the underlying implementation does not support this operation it will return a
| |
| leaveGroup | back to summary |
|---|---|
| public Future Implements io. Doc from io. Leaves a multicast group and notifies the
If the underlying implementation does not support this operation it will return a
| |
| leaveGroup | back to summary |
|---|---|
| public Future Implements io. Doc from io. Leave the specified multicast group at the specified interface using the specified source and notifies
the
If the underlying implementation does not support this operation it will return a
| |
| localAddress0 | back to summary |
|---|---|
| protected SocketAddress localAddress0() Implements abstract io. Doc from io. Returns the
| |
| networkInterface | back to summary |
|---|---|
| private NetworkInterface networkInterface() throws SocketException | |
| newSocket | back to summary |
|---|---|
| private static DatagramChannel newSocket(SelectorProvider provider) | |
| newSocket | back to summary |
|---|---|
| private static DatagramChannel newSocket(SelectorProvider provider, ProtocolFamily family) | |
| remoteAddress0 | back to summary |
|---|---|
| protected SocketAddress remoteAddress0() Implements abstract io. Doc from io. Return the
| |
| setActiveOnOpen | back to summary |
|---|---|
| private void setActiveOnOpen(boolean activeOnOpen) | |
| setExtendedOption | back to summary |
|---|---|
| protected <T> void setExtendedOption(ChannelOption<T> option, T value) Overrides io. Doc from io. Override to add support for more
| |
| write | back to summary |
|---|---|
| private int write(Buffer buf, SocketAddress remoteAddress) throws IOException | |