public void Run() { channel.Allocator.Buffer(); if (channel != null) { channel.WriteAndFlushAsync(byteBuffer); } }
/// <summary> /// 发送数据处理 /// </summary> /// <param name="netChannel"></param> /// <param name="data"></param> public void SendData(NetChannel <TData> netChannel, object data) { ISocketChannel channel = netChannel.channel as ISocketChannel; if (channel != null) { channel.WriteAndFlushAsync(data); } }