public NetworkClient(String host, int port) throws IOException { client = Network.connectToServer(NetworkConstants.GAME_NAME, NetworkConstants.PROTOCOL_VERSION, host, port); client.addClientStateListener(new ClientStateChangeListener(this)); //this.ed = new RemoteEntityData(client, 0); //ObjectMessageDelegator delegator = new ObjectMessageDelegator(this, true); // client.addMessageListener(delegator, delegator.getMessageTypes()); client.getServices().addServices(new RpcClientService(), new RmiClientService(), new AccountClientService(), new LobbyClientService(), new ChatClientService(), new EtherealClient(NetworkConstants.OBJECT_PROTOCOL, NetworkConstants.ZONE_GRID, NetworkConstants.ZONE_RADIUS)); }