Beispiel #1
0
 public void closeNetworking() {
   for (FixedTimer timer : timers) timer.stop();
   timers.clear();
   if (Global.connectingSocket != null) {
     try {
       Global.connectingSocket.close();
     } catch (IOException ex) {
     }
   }
   closeClient(mainServer);
   closeClient(bulletStream);
   closeClient(powerStream);
   closeClient(turretStream);
   closeClient(powerRemover);
   closeClient(chatLog);
   closeClient(fadeLog);
   closeClient(serverTime);
   if (playerByteStreams != null) {
     for (int i = 0; i < playerByteStreams.length; ++i) {
       closeClient(playerByteStreams[i]);
     }
   }
 }