157158159160161162163
// Flush queued messages. while (!messages.isEmpty() && connected == ConnectState.CONNECTED) { send(messages.poll()); } ClientEvents.get().fireEvent(new NetworkStatusEvent(ConnectionStatus.CONNECTED)); }
163164165166167168169
} @Override public void onDisconnect() { connected = ConnectState.DISCONNECTED; ClientEvents.get().fireEvent(new NetworkStatusEvent(ConnectionStatus.DISCONNECTED)); }