Example #1
0
        private void ProcessServerKcpMsg(IUdpEvent evt)
        {
            int iepHashCode            = evt.GetIPEndPoint().GetHashCode();
            UdpServerReceiver receiver = evt.GetUdpReceiver() as UdpServerReceiver;

            if (receiver == null)
            {
                return;
            }

            UdpServerSession session = receiver.GetUdpSessionMgr().FindSession(iepHashCode);

            if (session == null)
            {
                Log.WarnAf("[Udp] UdpServerReceiver ServerId = {0} Conv = {1}", receiver.GetServerId(), evt.GetConv());
            }
            else if (evt.GetConv() == session.GetConv())
            {
                session.KcpInput(evt.GetMessage());
            }
        }