Skip to content

Instantly share code, notes, and snippets.

@Tzeentchful
Last active August 29, 2015 14:04
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tzeentchful/2c876d5ad6e2704f2945 to your computer and use it in GitHub Desktop.
Save Tzeentchful/2c876d5ad6e2704f2945 to your computer and use it in GitHub Desktop.
Send a message to all servers on a Lilypad cluster
public class NetServerAnnouncer {
private Connect connect;
public NetServerAnnouncer(Connect connect) {
this.connect = connect;
}
public void sendMessage() {
try {
this.connect.request(new MessageRequest(Collections.EMPTY_LIST, "SomeChannel", "Some Message"));
} catch(RequestException exception) {
// ignore
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment