public RTServiceImpl() { if (rtClient.IsAvailable()) { rtClient.SetConnectEventListener(() => { foreach (ConnectListener listener in connectListeners) { listener(); } }); rtClient.SetDisconnectEventListener((result) => { foreach (DisconnectListener listener in disconnectListeners) { listener(result); } }); rtClient.SetConnectErrorEventListener((result) => { foreach (ConnectErrorListener listener in connectErrorListeners) { listener(result); } }); rtClient.SetReconnectAttemptEventListener((result) => { foreach (ReconnectAttemptListener listener in reconnectListeners) { listener(result); } }); } }
public bool IsAvailable() { return(rtClient.IsAvailable()); }