public void shutdown() { if (agentComm != null) { agentComm.shutdown(); agentComm.removeListener(serverComm); } serverComm.disconnect(); }
public void init(Viewer viewer, Configuration config) { try { agentComm = new DrawComm(viewer, config.networking.listenPort); } catch (SocketException e) { e.printStackTrace(); } serverComm = new ServerComm(viewer.getWorldModel(), config, viewer.getMode()); if (agentComm != null) { agentComm.addListener(serverComm); } }