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