public void FireNextRead(object msg) { IEventLoop loop = _channel.Loop; if (loop.InCurrentThread()) { if (Next != null) { Next.Handler.ChannelRead(Next, msg); } } else { loop.Execute(new SimpleRunnable(() => { if (Next != null) { Next.Handler.ChannelRead(Next, msg); } })); } }
public void FireNextAccept(object accepter) { IEventLoop loop = _channel.Loop; if (loop.InCurrentThread()) { if (Next != null) { Next.Handler.ChannelAccept(Next, accepter); } } else { loop.Execute(new SimpleRunnable(() => { if (Next != null) { Next.Handler.ChannelAccept(Next, accepter); } })); } }
public void FireNextInactive() { IEventLoop loop = _channel.Loop; if (loop.InCurrentThread()) { if (Next != null) { Next.Handler.ChannelInactive(Next); } } else { loop.Execute(new SimpleRunnable(() => { if (Next != null) { Next.Handler.ChannelInactive(Next); } })); } }
public void FirePreWrite(object msg) { IEventLoop loop = _channel.Loop; if (loop.InCurrentThread()) { if (Prev != null) { Prev.Handler.ChannelWrite(Prev, msg); } } else { loop.Execute(new SimpleRunnable(() => { if (Prev != null) { Prev.Handler.ChannelWrite(Prev, msg); } })); } }