public class MulticastClient extends Object
| Modifier and Type | Field | Description |
|---|---|---|
static String |
DEFAULT_ADDRESS |
Default-Multicast-Adresse.
|
static int |
DEFAULT_PORT |
Default-Port.
|
| Constructor | Description |
|---|---|
MulticastClient() |
Erzeugt einen neuen Listener auf der Standard-Adresse mit dem Standard-Port.
|
MulticastClient(String address,
int port) |
Erzeugt einen neuen Listener mit expliziter Angabe von Adresse und Port.
|
| Modifier and Type | Method | Description |
|---|---|---|
static void |
main(String[] args) |
ZUm Testen.
|
void |
received(DatagramPacket packet) |
Nimmt die empfangenen Daten entgegen.
|
void |
send(byte[] data) |
Sendet Daten via Multicast.
|
void |
stop() |
Stoppt den Listener.
|
public static final String DEFAULT_ADDRESS
public static final int DEFAULT_PORT
public MulticastClient()
throws IOException
IOExceptionpublic MulticastClient(String address, int port) throws IOException
address - Adresse.port - Port.IOExceptionpublic void stop()
throws IOException
IOExceptionpublic void send(byte[] data)
throws IOException
data - IOExceptionpublic void received(DatagramPacket packet) throws IOException
packet - IOExceptionCopyright © 2018. All rights reserved.