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