public class DiscoveryServer extends Object
DiscoveryClient
Constructor and Description |
---|
DiscoveryServer(int serverPort,
int clientPort) |
Modifier and Type | Method and Description |
---|---|
protected InetAddress |
getBroadcastInetAddress() |
String |
getMessage() |
static void |
main(String[] args) |
protected void |
run(int iStartStop) |
void |
send() |
void |
setMessage(String msg) |
boolean |
shouldRespond(String msg)
callback method used to determine if a send message should go out for the given
client message that was received.
|
void |
start() |
void |
stop() |
public DiscoveryServer(int serverPort, int clientPort)
serverPort
- port that the server will broadcast on.clientPort
- port that client broadcasts on.protected InetAddress getBroadcastInetAddress()
public void setMessage(String msg)
public String getMessage()
public boolean shouldRespond(String msg)
msg
- message received from client "where are you"public void stop()
Copyright © 1999–2019 ViaOA. All rights reserved.