private void onMessage(MessageEventArgs eventArgs) { if (eventArgs != null) { Ext.Emit(OnMessage, this, eventArgs); } }
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)); }
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); }
private void onOpen() { _readyState = WsState.OPEN; startMessageLoop(); Ext.Emit(OnOpen, this, EventArgs.Empty); }