Esempio n. 1
0
 public void shutdown() {
   if (agentComm != null) {
     agentComm.shutdown();
     agentComm.removeListener(serverComm);
   }
   serverComm.disconnect();
 }
Esempio n. 2
0
 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);
   }
 }