Package io.netty.channel.socket
Interface DatagramChannel
- All Superinterfaces:
AttributeMap
,Channel
,ChannelOutboundInvoker
,Comparable<Channel>
- All Known Implementing Classes:
EpollDatagramChannel
,KQueueDatagramChannel
,NioDatagramChannel
,OioDatagramChannel
A UDP/IP
Channel
.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.Channel
Channel.Unsafe
-
Method Summary
Modifier and TypeMethodDescriptionblock
(InetAddress multicastAddress, InetAddress sourceToBlock) Block the given sourceToBlock address for the given multicastAddress and notifies theChannelFuture
once the operation completes.block
(InetAddress multicastAddress, InetAddress sourceToBlock, ChannelPromise future) Block the given sourceToBlock address for the given multicastAddress and notifies theChannelFuture
once the operation completes.block
(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress sourceToBlock) Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies theChannelFuture
once the operation completes.block
(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress sourceToBlock, ChannelPromise future) Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies theChannelFuture
once the operation completes.config()
Returns the configuration of this channel.boolean
Returntrue
if theDatagramChannel
is connected to the remote peer.joinGroup
(InetAddress multicastAddress) Joins a multicast group and notifies theChannelFuture
once the operation completes.joinGroup
(InetAddress multicastAddress, ChannelPromise future) Joins a multicast group and notifies theChannelFuture
once the operation completes.joinGroup
(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source) Joins the specified multicast group at the specified interface and notifies theChannelFuture
once the operation completes.joinGroup
(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source, ChannelPromise future) Joins the specified multicast group at the specified interface and notifies theChannelFuture
once the operation completes.joinGroup
(InetSocketAddress multicastAddress, NetworkInterface networkInterface) Joins the specified multicast group at the specified interface and notifies theChannelFuture
once the operation completes.joinGroup
(InetSocketAddress multicastAddress, NetworkInterface networkInterface, ChannelPromise future) Joins the specified multicast group at the specified interface and notifies theChannelFuture
once the operation completes.leaveGroup
(InetAddress multicastAddress) Leaves a multicast group and notifies theChannelFuture
once the operation completes.leaveGroup
(InetAddress multicastAddress, ChannelPromise future) Leaves a multicast group and notifies theChannelFuture
once the operation completes.leaveGroup
(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source) Leave the specified multicast group at the specified interface using the specified source and notifies theChannelFuture
once the operation completes.leaveGroup
(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source, ChannelPromise future) Leave the specified multicast group at the specified interface using the specified source and notifies theChannelFuture
once the operation completes.leaveGroup
(InetSocketAddress multicastAddress, NetworkInterface networkInterface) Leaves a multicast group on a specified local interface and notifies theChannelFuture
once the operation completes.leaveGroup
(InetSocketAddress multicastAddress, NetworkInterface networkInterface, ChannelPromise future) Leaves a multicast group on a specified local interface and notifies theChannelFuture
once the operation completes.Returns the local address where this channel is bound to.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, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, eventLoop, flush, id, isActive, isOpen, isRegistered, isWritable, metadata, parent, pipeline, read, unsafe
Methods inherited from interface io.netty.channel.ChannelOutboundInvoker
bind, bind, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, voidPromise, write, write, writeAndFlush, writeAndFlush
Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
config
DatagramChannelConfig config()Description copied from interface:Channel
Returns the configuration of this channel. -
localAddress
InetSocketAddress localAddress()Description copied from interface:Channel
Returns the local address where this channel is bound to. The returnedSocketAddress
is supposed to be down-cast into more concrete type such asInetSocketAddress
to retrieve the detailed information.- Specified by:
localAddress
in interfaceChannel
- Returns:
- the local address of this channel.
null
if this channel is not bound.
-
remoteAddress
InetSocketAddress remoteAddress()Description copied from interface:Channel
Returns the remote address where this channel is connected to. The returnedSocketAddress
is supposed to be down-cast into more concrete type such asInetSocketAddress
to retrieve the detailed information.- Specified by:
remoteAddress
in interfaceChannel
- Returns:
- the remote address of this channel.
null
if 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()Returntrue
if theDatagramChannel
is connected to the remote peer. -
joinGroup
Joins a multicast group and notifies theChannelFuture
once the operation completes. -
joinGroup
Joins a multicast group and notifies theChannelFuture
once the operation completes. The givenChannelFuture
will be notified and also returned. -
joinGroup
Joins the specified multicast group at the specified interface and notifies theChannelFuture
once the operation completes. -
joinGroup
ChannelFuture joinGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface, ChannelPromise future) Joins the specified multicast group at the specified interface and notifies theChannelFuture
once the operation completes. The givenChannelFuture
will be notified and also returned. -
joinGroup
ChannelFuture joinGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source) Joins the specified multicast group at the specified interface and notifies theChannelFuture
once the operation completes. -
joinGroup
ChannelFuture joinGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source, ChannelPromise future) Joins the specified multicast group at the specified interface and notifies theChannelFuture
once the operation completes. The givenChannelFuture
will be notified and also returned. -
leaveGroup
Leaves a multicast group and notifies theChannelFuture
once the operation completes. -
leaveGroup
Leaves a multicast group and notifies theChannelFuture
once the operation completes. The givenChannelFuture
will be notified and also returned. -
leaveGroup
Leaves a multicast group on a specified local interface and notifies theChannelFuture
once the operation completes. -
leaveGroup
ChannelFuture leaveGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface, ChannelPromise future) Leaves a multicast group on a specified local interface and notifies theChannelFuture
once the operation completes. The givenChannelFuture
will be notified and also returned. -
leaveGroup
ChannelFuture leaveGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source) Leave the specified multicast group at the specified interface using the specified source and notifies theChannelFuture
once the operation completes. -
leaveGroup
ChannelFuture leaveGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source, ChannelPromise future) Leave the specified multicast group at the specified interface using the specified source and notifies theChannelFuture
once the operation completes. The givenChannelFuture
will be notified and also returned. -
block
ChannelFuture block(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress sourceToBlock) Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies theChannelFuture
once the operation completes. The givenChannelFuture
will be notified and also returned. -
block
ChannelFuture block(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress sourceToBlock, ChannelPromise future) Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies theChannelFuture
once the operation completes. The givenChannelFuture
will be notified and also returned. -
block
Block the given sourceToBlock address for the given multicastAddress and notifies theChannelFuture
once the operation completes. The givenChannelFuture
will be notified and also returned. -
block
Block the given sourceToBlock address for the given multicastAddress and notifies theChannelFuture
once the operation completes. The givenChannelFuture
will be notified and also returned.
-