public class UdpMulticastConnector extends UDPConnector
Connector which inherits functionality of UDPConnector
replacing DatagramSocket with a MulticastSocket to receive multicast requests
in compliance to RFC7390 Group Communication for the Constrained Application
Protocol (CoAP) to the registered multicast group.localAddr, LOGGER, running, UNDEFINED| Constructor and Description |
|---|
UdpMulticastConnector(InetAddress intfAddress,
InetSocketAddress localAddress,
InetAddress... multicastGroups)
Creates a connector bound to given multicast group and IP Port, using the specified network interface for
receiving multicast packets
Note: This constructor that allows you to specify a network interface was added to mitigate the issue described
at https://github.com/eclipse/californium/issues/872.
|
UdpMulticastConnector(InetSocketAddress localAddress,
InetAddress... multicastGroups)
Creates a connector bound to given multicast group and IP Port, using the default (any) network interface for
receiving multicast packets
Note: You might run into issues described at https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4701650 if you
do not specify a network interface.
|
| Modifier and Type | Method and Description |
|---|---|
void |
start()
Starts the connector.
|
destroy, getAddress, getProtocol, getReceiveBufferSize, getReceiverPacketSize, getReceiverThreadCount, getSendBufferSize, getSenderThreadCount, init, send, setEndpointContextMatcher, setRawDataReceiver, setReceiveBufferSize, setReceiverPacketSize, setReceiverThreadCount, setSendBufferSize, setSenderThreadCount, stop, toStringpublic UdpMulticastConnector(InetAddress intfAddress, InetSocketAddress localAddress, InetAddress... multicastGroups)
UdpMulticastConnector implementation may be used with a proper initialisation of the MulticastSocket
in an overriden start() method for that case.intfAddress - address of interface to use to receive multicast packetslocalAddress - local socket addressmulticastGroups - multicast groups to joinpublic UdpMulticastConnector(InetSocketAddress localAddress, InetAddress... multicastGroups)
localAddress - local socket addressmulticastGroups - multicast groups to joinpublic void start()
throws IOException
Connectorstart in interface Connectorstart in class UDPConnectorIOException - Signals that an I/O exception has occurred.Copyright © 2019 Eclipse Foundation. All rights reserved.