Exemple #1
0
 private static int KcpOutput(IntPtr bytes, int len, IntPtr kcp, IntPtr user)
 {
     try
     {
         KChannel kChannel = KChannel.kChannels[(uint) user];
         kChannel.Output(bytes, len);
     }
     catch (Exception e)
     {
         Log.Error(e);
         return len;
     }
     return len;
 }
Exemple #2
0
        public static void Output(IntPtr bytes, int count, IntPtr user)
        {
            if (Instance == null)
            {
                return;
            }
            AChannel aChannel = Instance.GetChannel((uint)user);

            if (aChannel == null)
            {
                Log.Error($"not found kchannel, {(uint)user}");
                return;
            }

            KChannel kChannel = aChannel as KChannel;

            kChannel.Output(bytes, count);
        }