예제 #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)
 {
 }