Exemplo n.º 1
0
 public void Run()
 {
     channel.Allocator.Buffer();
     if (channel != null)
     {
         channel.WriteAndFlushAsync(byteBuffer);
     }
 }
Exemplo n.º 2
0
        /// <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);
            }
        }