Package io.netty.channel.socket
Interface DatagramChannel
-
- All Superinterfaces:
AttributeMap,Channel,ChannelOutboundInvoker,java.lang.Comparable<Channel>
- All Known Implementing Classes:
EpollDatagramChannel,IoUringDatagramChannel,KQueueDatagramChannel,NioDatagramChannel,OioDatagramChannel
public interface DatagramChannel extends Channel
A UDP/IPChannel.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.Channel
Channel.Unsafe
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChannelFutureblock(java.net.InetAddress multicastAddress, java.net.InetAddress sourceToBlock)Block the given sourceToBlock address for the given multicastAddress and notifies theChannelFutureonce the operation completes.ChannelFutureblock(java.net.InetAddress multicastAddress, java.net.InetAddress sourceToBlock, ChannelPromise future)Block the given sourceToBlock address for the given multicastAddress and notifies theChannelFutureonce the operation completes.ChannelFutureblock(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress sourceToBlock)Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies theChannelFutureonce the operation completes.ChannelFutureblock(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress sourceToBlock, ChannelPromise future)Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies theChannelFutureonce the operation completes.DatagramChannelConfigconfig()Returns the configuration of this channel.booleanisConnected()Returntrueif theDatagramChannelis connected to the remote peer.ChannelFuturejoinGroup(java.net.InetAddress multicastAddress)Joins a multicast group and notifies theChannelFutureonce the operation completes.ChannelFuturejoinGroup(java.net.InetAddress multicastAddress, ChannelPromise future)Joins a multicast group and notifies theChannelFutureonce the operation completes.ChannelFuturejoinGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source)Joins the specified multicast group at the specified interface and notifies theChannelFutureonce the operation completes.ChannelFuturejoinGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source, ChannelPromise future)Joins the specified multicast group at the specified interface and notifies theChannelFutureonce the operation completes.ChannelFuturejoinGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface)Joins the specified multicast group at the specified interface and notifies theChannelFutureonce the operation completes.ChannelFuturejoinGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface, ChannelPromise future)Joins the specified multicast group at the specified interface and notifies theChannelFutureonce the operation completes.ChannelFutureleaveGroup(java.net.InetAddress multicastAddress)Leaves a multicast group and notifies theChannelFutureonce the operation completes.ChannelFutureleaveGroup(java.net.InetAddress multicastAddress, ChannelPromise future)Leaves a multicast group and notifies theChannelFutureonce the operation completes.ChannelFutureleaveGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source)Leave the specified multicast group at the specified interface using the specified source and notifies theChannelFutureonce the operation completes.ChannelFutureleaveGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source, ChannelPromise future)Leave the specified multicast group at the specified interface using the specified source and notifies theChannelFutureonce the operation completes.ChannelFutureleaveGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface)Leaves a multicast group on a specified local interface and notifies theChannelFutureonce the operation completes.ChannelFutureleaveGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface, ChannelPromise future)Leaves a multicast group on a specified local interface and notifies theChannelFutureonce the operation completes.java.net.InetSocketAddresslocalAddress()Returns the local address where this channel is bound to.java.net.InetSocketAddressremoteAddress()Returns the remote address where this channel is connected to.-
Methods inherited from interface io.netty.util.AttributeMap
attr, hasAttr
-
Methods inherited from interface io.netty.channel.Channel
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, eventLoop, flush, getOption, id, isActive, isOpen, isRegistered, isWritable, metadata, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, setOption, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlush
-
-
-
-
Method Detail
-
config
DatagramChannelConfig config()
Description copied from interface:ChannelReturns the configuration of this channel.
-
localAddress
java.net.InetSocketAddress localAddress()
Description copied from interface:ChannelReturns the local address where this channel is bound to. The returnedSocketAddressis supposed to be down-cast into more concrete type such asInetSocketAddressto retrieve the detailed information.- Specified by:
localAddressin interfaceChannel- Returns:
- the local address of this channel.
nullif this channel is not bound.
-
remoteAddress
java.net.InetSocketAddress remoteAddress()
Description copied from interface:ChannelReturns the remote address where this channel is connected to. The returnedSocketAddressis supposed to be down-cast into more concrete type such asInetSocketAddressto retrieve the detailed information.- Specified by:
remoteAddressin interfaceChannel- Returns:
- the remote address of this channel.
nullif this channel is not connected. If this channel is not connected but it can receive messages from arbitrary remote addresses (e.g.DatagramChannel, useDefaultAddressedEnvelope.recipient()to determine the origination of the received message as this method will returnnull.
-
isConnected
boolean isConnected()
Returntrueif theDatagramChannelis connected to the remote peer.
-
joinGroup
ChannelFuture joinGroup(java.net.InetAddress multicastAddress)
Joins a multicast group and notifies theChannelFutureonce the operation completes.
-
joinGroup
ChannelFuture joinGroup(java.net.InetAddress multicastAddress, ChannelPromise future)
Joins a multicast group and notifies theChannelFutureonce the operation completes. The givenChannelFuturewill be notified and also returned.
-
joinGroup
ChannelFuture joinGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface)
Joins the specified multicast group at the specified interface and notifies theChannelFutureonce the operation completes.
-
joinGroup
ChannelFuture joinGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface, ChannelPromise future)
Joins the specified multicast group at the specified interface and notifies theChannelFutureonce the operation completes. The givenChannelFuturewill be notified and also returned.
-
joinGroup
ChannelFuture joinGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source)
Joins the specified multicast group at the specified interface and notifies theChannelFutureonce the operation completes.
-
joinGroup
ChannelFuture joinGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source, ChannelPromise future)
Joins the specified multicast group at the specified interface and notifies theChannelFutureonce the operation completes. The givenChannelFuturewill be notified and also returned.
-
leaveGroup
ChannelFuture leaveGroup(java.net.InetAddress multicastAddress)
Leaves a multicast group and notifies theChannelFutureonce the operation completes.
-
leaveGroup
ChannelFuture leaveGroup(java.net.InetAddress multicastAddress, ChannelPromise future)
Leaves a multicast group and notifies theChannelFutureonce the operation completes. The givenChannelFuturewill be notified and also returned.
-
leaveGroup
ChannelFuture leaveGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface)
Leaves a multicast group on a specified local interface and notifies theChannelFutureonce the operation completes.
-
leaveGroup
ChannelFuture leaveGroup(java.net.InetSocketAddress multicastAddress, java.net.NetworkInterface networkInterface, ChannelPromise future)
Leaves a multicast group on a specified local interface and notifies theChannelFutureonce the operation completes. The givenChannelFuturewill be notified and also returned.
-
leaveGroup
ChannelFuture leaveGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source)
Leave the specified multicast group at the specified interface using the specified source and notifies theChannelFutureonce the operation completes.
-
leaveGroup
ChannelFuture leaveGroup(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress source, ChannelPromise future)
Leave the specified multicast group at the specified interface using the specified source and notifies theChannelFutureonce the operation completes. The givenChannelFuturewill be notified and also returned.
-
block
ChannelFuture block(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress sourceToBlock)
Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies theChannelFutureonce the operation completes. The givenChannelFuturewill be notified and also returned.
-
block
ChannelFuture block(java.net.InetAddress multicastAddress, java.net.NetworkInterface networkInterface, java.net.InetAddress sourceToBlock, ChannelPromise future)
Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies theChannelFutureonce the operation completes. The givenChannelFuturewill be notified and also returned.
-
block
ChannelFuture block(java.net.InetAddress multicastAddress, java.net.InetAddress sourceToBlock)
Block the given sourceToBlock address for the given multicastAddress and notifies theChannelFutureonce the operation completes. The givenChannelFuturewill be notified and also returned.
-
block
ChannelFuture block(java.net.InetAddress multicastAddress, java.net.InetAddress sourceToBlock, ChannelPromise future)
Block the given sourceToBlock address for the given multicastAddress and notifies theChannelFutureonce the operation completes. The givenChannelFuturewill be notified and also returned.
-
-