Exemple #1
0
 private void onMessage(MessageEventArgs eventArgs)
 {
     if (eventArgs != null)
     {
         Ext.Emit(OnMessage, this, eventArgs);
     }
 }
Exemple #2
0
        private void onError(string message)
        {
#if DEBUG
            var callerFrame = new StackFrame(1);
            var caller      = callerFrame.GetMethod();
            Console.WriteLine("WS: Error@{0}: {1}", caller.Name, message);
#endif
            Ext.Emit(OnError, this, new ErrorEventArgs(message));
        }
Exemple #3
0
        private void onClose(CloseEventArgs eventArgs)
        {
            if (!Thread.CurrentThread.IsBackground)
            {
                if (_exitMessageLoop != null)
                {
                    _exitMessageLoop.WaitOne(5 * 1000, false);
                }
            }

            if (closeConnection())
            {
                eventArgs.WasClean = true;
            }

            Ext.Emit(OnClose, this, eventArgs);
        }
Exemple #4
0
 private void onOpen()
 {
     _readyState = WsState.OPEN;
     startMessageLoop();
     Ext.Emit(OnOpen, this, EventArgs.Empty);
 }