예제 #1
0
        public UdpServerReceiver(UInt64 _serverId, UdpVerfiyReqDele _dele, uint _convCapacity, IUdpMsgHandler _handler, long _maxHeartBeatTime)
        {
            serverId   = _serverId;
            verifyDele = _dele;
            sessionMgr = new UdpServerSessionMgr(_serverId, _convCapacity, _handler, _maxHeartBeatTime);

            kcpVerifyReqBytes    = System.Text.Encoding.Default.GetBytes(KcpDef.KcpVerifyReq);
            kcpVerifyReqTotalLen = kcpVerifyReqBytes.Length + KcpDef.KcpVerifyTokenLen;
        }
예제 #2
0
 public void Start(IPEndPoint localIEP, UdpVerfiyReqDele _dele, uint _convCapacity, IUdpMsgHandler _handler, long _maxHeartBeatTime)
 {
     udpReceiver = new UdpServerReceiver(serverId, _dele, _convCapacity, _handler, _maxHeartBeatTime);
     udpReceiver.StartReceive(localIEP);
 }