Implemented server to manage a list of available servers on the internet.

- Implemented a server manager that keeps track of servers & room codes, and removes old servers
- Implemented queries to find a server with a specific room code
- Implemented protocol to register servers

#story[1281]
This commit is contained in:
Michael Rausch
2017-09-20 20:26:14 +12:00
parent 034e4c252a
commit e17e9749d8
14 changed files with 615 additions and 8 deletions
@@ -1,5 +1,9 @@
package seng302.gameServer;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.jmdns.JmDNS;
import javax.jmdns.ServiceInfo;
import java.io.IOException;
@@ -27,7 +31,7 @@ public class ServerAdvertiser {
*/
private static String SERVICE = "_partyatsea";
private static String PROTOCOL = "_tcp";
public static String SERVICE_TYPE = SERVICE + "." + PROTOCOL + ".local.";
public static String SERVICE_TYPE = SERVICE + "." + PROTOCOL + ".homekit.bonjour.michaelrausch.nz.";
private static ServerAdvertiser instance = null;
private static JmDNS jmdnsInstance = null;