예제 #1
0
        protected override void DoClose()
        {
            var log = LogManager.GetLogger(Global.CallerName());

            var closeListener = new CloseListener(this);

            if (ReadyState == ReadyStateEnum.Open)
            {
                log.Info("transport open - closing");
                closeListener.Call();
            }
            else
            {
                // in case we're trying to close while
                // handshaking is in progress (engine.io-client GH-164)
                log.Info("transport not open - deferring close");
                Once(EventOpen, closeListener);
            }
        }
        protected override void DoClose() {
            var log = LogManager.GetLogger(Global.CallerName());

            var closeListener = new CloseListener(this);

            if (ReadyState == ReadyStateEnum.OPEN) {
                log.Info("transport open - closing");
                closeListener.Call();
            } else {
                // in case we're trying to close while
                // handshaking is in progress (engine.io-client GH-164)
                log.Info("transport not open - deferring close");
                this.Once(EVENT_OPEN, closeListener);
            }
        }
예제 #3
0
 /// <summary>
 /// stop all listeners
 /// </summary>
 public void StopListening()
 {
     CloseListener?.Invoke(this, null);
     logger.Log("Stop listening to all folders", Logger.Message.MessageTypeEnum.INFO);
 }