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; }
public void Start(IPEndPoint localIEP, UdpVerfiyReqDele _dele, uint _convCapacity, IUdpMsgHandler _handler, long _maxHeartBeatTime) { udpReceiver = new UdpServerReceiver(serverId, _dele, _convCapacity, _handler, _maxHeartBeatTime); udpReceiver.StartReceive(localIEP); }