internal void Initialize() { this.RquestGet(string.Format(this.RTC_Router_Server, (object) AVClient.ApplicationId), "GET", (IDictionary<string, object>) null, (AsyncCallback) (ar => { this.chatServerUrl = this.GetChatServer(ar); if (!string.IsNullOrEmpty(this.chatServerUrl)) { this.ConnectChatServer(this.chatServerUrl); } else { WebSocketConnectedFaildArgs e = new WebSocketConnectedFaildArgs(); e.Error = new AVIMError() { Code = AVException.ErrorCode.CurrentClientNetworkIsNotAvailable }; if (this.m_OnWebSocketConnectedFaild == null) return; this.m_OnWebSocketConnectedFaild((object) this, e); } })); }
private void rtc_OnWebSocketConnectedFaild(object sender, WebSocketConnectedFaildArgs e) { if (this.AVSessionListener == null || this.AVSessionListener.OnError == null) return; this.AVSessionListener.OnError(this, e.Error); }