Beispiel #1
0
 public override void OnMessage(USocket us,ByteBuf bb)
 {
     Console.WriteLine ("收到数据:");
     bb.ReaderIndex (2);
     string s=bb.ReadUTF8 ();
     Console.WriteLine (s);
     bb.ReaderIndex (0);
     us.Send (bb);//原样返回给服务器,服务器是一个echo,也会原样返回
 }
Beispiel #2
0
        public override void OnMessage(USocket us, ByteBuf bb)
        {
            Console.WriteLine("收到数据:");
            bb.ReaderIndex(2);
            string s = bb.ReadUTF8();

            Console.WriteLine(s);
            bb.ReaderIndex(0);
            us.Send(bb);             //原样返回给服务器,服务器是一个echo,也会原样返回
        }