Just renaming some vars to be more inline with what

they are.  Makes it easier to find calls to Client.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7002 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
PSp..om 14 years ago
parent 7c9d4f19e5
commit ef77186386
  1. 18
      engine/src/networking/com/jme3/network/sync/ServerSyncService.java

@ -153,8 +153,8 @@ public class ServerSyncService extends ConnectionAdapter implements Service {
} }
@Override @Override
public void clientConnected(Client id){ public void clientConnected(Client client){
System.out.println("Server: Client connected: " + id); System.out.println("Server: Client connected: " + client);
SyncMessage msg = new SyncMessage(); SyncMessage msg = new SyncMessage();
msg.setReliable(true); // sending INIT information, has to be reliable. msg.setReliable(true); // sending INIT information, has to be reliable.
@ -169,7 +169,7 @@ public class ServerSyncService extends ConnectionAdapter implements Service {
} }
try { try {
id.send(msg); client.send(msg);
} catch (IOException ex) { } catch (IOException ex) {
ex.printStackTrace(); ex.printStackTrace();
} }
@ -177,8 +177,8 @@ public class ServerSyncService extends ConnectionAdapter implements Service {
} }
@Override @Override
public void clientDisconnected(Client id){ public void clientDisconnected(Client client){
System.out.println("Server: Client disconnected: " + id); System.out.println("Server: Client disconnected: " + client);
} }
private void sendDelayedMessages(){ private void sendDelayedMessages(){
@ -191,9 +191,9 @@ public class ServerSyncService extends ConnectionAdapter implements Service {
if (packetDropRate > FastMath.nextRandomFloat()) if (packetDropRate > FastMath.nextRandomFloat())
continue; continue;
for (Client id : server.getConnectors()){ for (Client client : server.getConnectors()){
try { try {
id.send(entry.getValue()); client.send(entry.getValue());
} catch (IOException ex) { } catch (IOException ex) {
ex.printStackTrace(); ex.printStackTrace();
} }
@ -237,9 +237,9 @@ public class ServerSyncService extends ConnectionAdapter implements Service {
long timeToSend = System.currentTimeMillis() + latencyTime; long timeToSend = System.currentTimeMillis() + latencyTime;
latencyQueue.put(timeToSend, msg); latencyQueue.put(timeToSend, msg);
}else{ }else{
for (Client id : server.getConnectors()){ for (Client client : server.getConnectors()){
try { try {
id.send(msg); // unreliable client.send(msg); // unreliable
} catch (IOException ex) { } catch (IOException ex) {
ex.printStackTrace(); ex.printStackTrace();
} }

Loading…
Cancel
Save