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)); }
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(); } }