void send(Scores scoreTable) { if (out == null) return; try { out.reset(); out.writeObject(scoreTable); out.flush(); } catch (Exception e) { ctrl.serverError("Scores Send error!"); } }
void send(PlayersList players) { if (out == null) return; try { out.reset(); out.writeObject(players); out.flush(); } catch (Exception e) { ctrl.serverError("PlayersList Send error!"); } }
void send(TimeStamp timeStamp) { if (out == null) return; try { out.reset(); out.writeObject(timeStamp); out.flush(); } catch (Exception e) { ctrl.serverError("TimeStamp Send error!"); } }
void send(GameInfo gameInfo) { if (out == null) return; try { out.reset(); out.writeObject(gameInfo); out.flush(); } catch (Exception e) { ctrl.serverError("GameInfo Send error!"); } }
/** * 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(); }