public class NetworkBroadcast
extends java.lang.Object
implements java.lang.Runnable
Runnable sending a broadcast into the local network when executed.| Constructor and Description |
|---|
NetworkBroadcast(int port,
byte[] payload,
EncryptionType encryptionType,
byte[] enncryptionKey)
Creates a new
NetworkBroadcast object. |
NetworkBroadcast(NetworkEnvironment owner,
byte[] payload)
Creates a new
NetworkBroadcast using the infos from the given NetworkEnvironment's NetworkEnvironmentSettings. |
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
public NetworkBroadcast(NetworkEnvironment owner, byte[] payload)
NetworkBroadcast using the infos from the given NetworkEnvironment's NetworkEnvironmentSettings.
Keep in mind to execute this Runnable!owner - the given NetworkEnvironment to get the needed infos frompayload - the payload to sendjava.io.IOExceptionpublic NetworkBroadcast(int port,
byte[] payload,
EncryptionType encryptionType,
byte[] enncryptionKey)
NetworkBroadcast object.
Keep in mind to execute this Runnable!port - the port to which the broadcast should be sendpayload - the payload that should be sendencryptionType - the used EncryptionTypeenncryptionKey - the used encryption key or null if EncryptionType.NONE is usedjava.io.IOException