protected void AddAction() { HandlerAction action = HandlerAction.Acquire(); action.session = this; _loop.Execute(action.emit); }
protected void AddAction(int length) { HandlerAction action = HandlerAction.Acquire(); action.session = this; action.length = length; _loop.Execute(action.emit); }
protected void AddAction(Request request) { HandlerAction action = HandlerAction.Acquire(); action.session = this; action.request = request; _loop.Execute(action.emit); }
private void AddAction(Exception e) { HandlerAction action = HandlerAction.Acquire(); action.server = this; action.exception = e; _loop.Execute(action.emit); }
private void AddAction(Socket socket) { HandlerAction action = HandlerAction.Acquire(); action.server = this; action.socket = socket; _loop.Execute(action.emit); }
public static void Exception(Exception e) { if (!initialized) { throw new InvalidOperationException(); } if (thread_init && threadID == Thread.CurrentThread.ManagedThreadId) { ExecWrite(DateTime.Now, e, GetStackTrace(Level.Error, e)); } else { HandlerAction action = HandlerAction.Acquire(); action.datetime = DateTime.Now; action.exception = e; action.stacks = GetStackTrace(Level.Error, e); lock (actions_mtx) { actions.Add(action); } } }
private static void Write(Level level, string text) { if (!initialized) { throw new InvalidOperationException(); } if (thread_init && threadID == Thread.CurrentThread.ManagedThreadId) { ExecWrite(DateTime.Now, level, text, GetStackTrace(level, 2)); } else { HandlerAction action = HandlerAction.Acquire(); action.datetime = DateTime.Now; action.level = level; action.text = text; action.stacks = GetStackTrace(level, 2); lock (actions_mtx) { actions.Add(action); } } }