public class MulticastListener
extends java.lang.Object
implements java.lang.Runnable
Constructor and Description |
---|
MulticastListener(int multicastPort,
java.lang.String multicastGroup,
byte[] expectedMessage,
byte[] returnMessage)
Creates a multicast listener on the specified multicast port,
bound to the specified multicast group.
|
Modifier and Type | Method and Description |
---|---|
void |
run()
Run method waits for Multicast packets with the specified contents
and replies with the specified message.
|
void |
stopListener()
Waits for datagram listener to finish, with a timeout.
|
public MulticastListener(int multicastPort, java.lang.String multicastGroup, byte[] expectedMessage, byte[] returnMessage) throws java.io.IOException, java.net.UnknownHostException
multicastPort
- Port to bind this listener to.multicastGroup
- Group to bind this listener to.expectedMessage
- the message to look forreturnMessage
- the message to reply withjava.io.IOException
java.net.UnknownHostException
Copyright © 1999-2012 Maxim Integrated Products. All Rights Reserved.