Ejemplo n.º 1
0
 private void sendClientList() {
   Vector<String> clientIPList = new Vector<String>();
   for (WorkStation ws : workStations) {
     clientIPList.add(ws.getClientName());
   }
   parent.dispatchEvent(new MSG(parent, MSG.CLIENT_LIST, clientIPList));
 }
Ejemplo n.º 2
0
 public void startGame() {
   try {
     String msg = "{ NOP " + getNumberOfPlayers() + " ";
     for (WorkStation w : workStations) {
       msg = msg + w.getClientName() + " ";
     }
     msg = msg + "}";
     sendToAll(msg, null);
   } catch (SocketException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }