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
IOException
public MulticastClient(String address, int port) throws IOException
address
- Adresse.port
- Port.IOException
public void stop() throws IOException
IOException
public void send(byte[] data) throws IOException
data
- IOException
public void received(DatagramPacket packet) throws IOException
packet
- IOException
Copyright © 2018. All rights reserved.