Esempio n. 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);
 }
 protected override void BuildCodecsBeforePlayerCreated(PeerContext x)
 {
     DebugLog($"kcp {nameof(BuildCodecsBeforePlayerCreated)}");
     x.Codec = new Codec.KcpCodecEx(x);
 }
Esempio n. 3
0
 public KcpPeerEx(PeerContext pc) : base(pc)
 {
 }