示例#1
0
 void OnConnect()
 {
     _deffered.Defer((System.Action) delegate()
     {
         if (OnConnected != null)
         {
             OnConnected();
         }
     });
     //Debug.Log("Connected to push server");
 }
 void OnError(string error)
 {
     if (Options.KeepAlive)
     {
         // reconnect if there's a error
         _deferred.Defer((System.Action) delegate(){
             Coroutines.SetTimeout(delegate(){
                 EB.Debug.Log("Reconnecting");
                 ConnectIfNeeded();
             }, 1000);
         });
     }
 }
示例#3
0
 void OnSocketError(string error)
 {
     EB.Debug.LogError("Socket error!: " + error);
     _deferred.Defer((System.Action <string>)DispatchError, error);
 }