Esempio n. 1
3
 void send(Scores scoreTable) {
   if (out == null) return;
   try {
     out.reset();
     out.writeObject(scoreTable);
     out.flush();
   } catch (Exception e) {
     ctrl.serverError("Scores Send error!");
   }
 }
Esempio n. 2
1
 void send(PlayersList players) {
   if (out == null) return;
   try {
     out.reset();
     out.writeObject(players);
     out.flush();
   } catch (Exception e) {
     ctrl.serverError("PlayersList Send error!");
   }
 }
Esempio n. 3
1
 void send(TimeStamp timeStamp) {
   if (out == null) return;
   try {
     out.reset();
     out.writeObject(timeStamp);
     out.flush();
   } catch (Exception e) {
     ctrl.serverError("TimeStamp Send error!");
   }
 }
Esempio n. 4
0
 void send(GameInfo gameInfo) {
   if (out == null) return;
   try {
     out.reset();
     out.writeObject(gameInfo);
     out.flush();
   } catch (Exception e) {
     ctrl.serverError("GameInfo Send error!");
   }
 }
Esempio n. 5
0
 /**
  * Reset the output stream so we can use the same buffer repeatedly. This would not normally be
  * used, but is necessary in some circumstances when Java refuses to send data that it thinks has
  * been sent.
  */
 public final void forceResetAfterSend() throws IOException {
   output.reset();
 }