Пример #1
0
 public KcpPeerBase(PeerContext pc) : base(pc)
 {
     this.pc = pc;
     //kcp create放在这里比较合适
     if (kcp == null)
     {
         throw new NullReferenceException("kcp codec lost");
     }
     realsend = new k.d_output(udp_output);
     pc.EncoderData->output = Marshal.GetFunctionPointerForDelegate(realsend);
 }
Пример #2
0
 protected override void BuildCodecsBeforePlayerCreated(PeerContext x)
 {
     DebugLog($"kcp {nameof(BuildCodecsBeforePlayerCreated)}");
     x.Codec = new Codec.KcpCodecEx(x);
 }
Пример #3
0
 public KcpPeerEx(PeerContext pc) : base(pc)
 {
 }