コード例 #1
0
ファイル: CommFactory.cs プロジェクト: ldw880212/RsspII
        public override IRsspNode Create()
        {
            var listeners         = _settings.GetListeningEndPoints();
            var deviceType        = (byte)_settings.DeviceType;
            var appType           = _settings.ApplicationType;
            var acceptableClients = _settings.GetAcceptableClients();

            var cfg = new RsspServerConfig(_settings.LocalID, deviceType, appType, listeners, acceptableClients);

            cfg.AuthenticationKeys = _settings.GetAuthenticationKeys();
            cfg.EcInterval         = _settings.EcInterval;
            cfg.SeqNoThreshold     = _settings.SeqNoThreshold;

            return(RsspFactory.CreateServerNode(cfg));
        }
コード例 #2
0
ファイル: CommFactory.cs プロジェクト: ldw880212/RsspII
        public override IRsspNode Create()
        {
            var linkCfg     = _settings.GetLinkConfig();
            var deviceType  = (byte)_settings.DeviceType;
            var defenseTech = _settings.DefenseTech;
            var appType     = _settings.ApplicationType;

            var cfg = new RsspClientConfig(_settings.LocalID, deviceType, appType, defenseTech, linkCfg);

            cfg.AuthenticationKeys = _settings.GetAuthenticationKeys();
            cfg.EcInterval         = _settings.EcInterval;
            cfg.SeqNoThreshold     = _settings.SeqNoThreshold;

            return(RsspFactory.CreateClientNode(cfg));
        }