Top Description Methods
io.netty5.channel.socket

public Interface DatagramChannel

extends Channel
Known Direct Implementers
io.netty5.channel.socket.nio.NioDatagramChannel
Imports
io.netty5.channel.Channel, .ChannelOption, io.netty5.util.concurrent.Future, java.net.InetAddress, .NetworkInterface

A UDP/IP Channel.

Available options

In addition to the options provided by Channel, DatagramChannel allows the following options in the option map:
ChannelOption INET INET6 UNIX
ChannelOption#DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATIONXX-
ChannelOption#SO_BROADCASTXX-
ChannelOption#SO_REUSEADDRXX-
ChannelOption#SO_RCVBUFXXX
ChannelOption#SO_SNDBUFXXX
ChannelOption#IP_MULTICAST_LOOP_DISABLEDXX-
ChannelOption#IP_MULTICAST_IFXX-
ChannelOption#IP_MULTICAST_TTLXX-
ChannelOption#IP_TOSXX-

Method Summary

Modifier and TypeMethod and Description
public Future<Void>

Returns:

a Future which is notified once the operation completes.
block
(InetAddress
the multicast group address.
multicastAddress
,
NetworkInterface
the interface to use.
networkInterface
,
InetAddress
the source address.
sourceToBlock
)

Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies the Future once the operation completes.

public Future<Void>

Returns:

a Future which is notified once the operation completes.
block
(InetAddress
the multicast group address.
multicastAddress
,
InetAddress
the source address.
sourceToBlock
)

Block the given sourceToBlock address for the given multicastAddress and notifies the Future once the operation completes.

public boolean
isConnected()

Return true if the DatagramChannel is connected to the remote peer.

public Future<Void>

Returns:

a Future which is notified once the operation completes.
joinGroup
(InetAddress
the multicast group address.
multicastAddress
)

Joins a multicast group and notifies the Future once the operation completes.

public Future<Void>

Returns:

a Future which is notified once the operation completes.
joinGroup
(InetAddress
the multicast group address.
multicastAddress
,
NetworkInterface
the interface to use.
networkInterface
,
InetAddress
the source address (might be null).
source
)

Joins the specified multicast group at the specified interface and notifies the Future once the operation completes.

public Future<Void>

Returns:

a Future which is notified once the operation completes.
leaveGroup
(InetAddress
the multicast group address.
multicastAddress
)

Leaves a multicast group and notifies the Future once the operation completes.

public Future<Void>

Returns:

a Future which is notified once the operation completes.
leaveGroup
(InetAddress
the multicast group address.
multicastAddress
,
NetworkInterface
the interface to use.
networkInterface
,
InetAddress
the source address (might be null).
source
)

Leave the specified multicast group at the specified interface using the specified source and notifies the Future once the operation completes.

Inherited from io.netty5.channel.Channel:
bindbufferAllocatorclosecloseFutureconnectconnectderegisterdisconnectexecutorflushgetOptionidisActiveisOpenisOptionSupportedisShutdownisWritablelocalAddressparentpipelinereadreadregisterremoteAddresssendOutboundEventsetOptionshutdownwritableByteswritewriteAndFlush

Method Detail

blockback to summary
public Future<Void> block(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress sourceToBlock)

Block the given sourceToBlock address for the given multicastAddress on the given networkInterface and notifies the Future once the operation completes.

If the underlying implementation does not support this operation it will return a Future which is failed with an UnsupportedOperationException.

Parameters
multicastAddress:InetAddress

the multicast group address.

networkInterface:NetworkInterface

the interface to use.

sourceToBlock:InetAddress

the source address.

Returns:Future<Void>

a Future which is notified once the operation completes.

blockback to summary
public Future<Void> block(InetAddress multicastAddress, InetAddress sourceToBlock)

Block the given sourceToBlock address for the given multicastAddress and notifies the Future once the operation completes.

If the underlying implementation does not support this operation it will return a Future which is failed with an UnsupportedOperationException.

Parameters
multicastAddress:InetAddress

the multicast group address.

sourceToBlock:InetAddress

the source address.

Returns:Future<Void>

a Future which is notified once the operation completes.

isConnectedback to summary
public boolean isConnected()

Return true if the DatagramChannel is connected to the remote peer.

joinGroupback to summary
public Future<Void> joinGroup(InetAddress multicastAddress)

Joins a multicast group and notifies the Future once the operation completes.

If the underlying implementation does not support this operation it will return a Future which is failed with an UnsupportedOperationException.

Parameters
multicastAddress:InetAddress

the multicast group address.

Returns:Future<Void>

a Future which is notified once the operation completes.

joinGroupback to summary
public Future<Void> joinGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source)

Joins the specified multicast group at the specified interface and notifies the Future once the operation completes.

If the underlying implementation does not support this operation it will return a Future which is failed with an UnsupportedOperationException.

Parameters
multicastAddress:InetAddress

the multicast group address.

networkInterface:NetworkInterface

the interface to use.

source:InetAddress

the source address (might be null).

Returns:Future<Void>

a Future which is notified once the operation completes.

leaveGroupback to summary
public Future<Void> leaveGroup(InetAddress multicastAddress)

Leaves a multicast group and notifies the Future once the operation completes.

If the underlying implementation does not support this operation it will return a Future which is failed with an UnsupportedOperationException.

Parameters
multicastAddress:InetAddress

the multicast group address.

Returns:Future<Void>

a Future which is notified once the operation completes.

leaveGroupback to summary
public Future<Void> leaveGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source)

Leave the specified multicast group at the specified interface using the specified source and notifies the Future once the operation completes.

If the underlying implementation does not support this operation it will return a Future which is failed with an UnsupportedOperationException.

Parameters
multicastAddress:InetAddress

the multicast group address.

networkInterface:NetworkInterface

the interface to use.

source:InetAddress

the source address (might be null).

Returns:Future<Void>

a Future which is notified once the operation completes.