Beispiel #1
0
        public static RoamingNetworkInfo Create(this RoamingNetwork RoamingNetwork,
                                                Tracker_Id TrackerId,
                                                DateTime ExpiredAfter,

                                                Byte priority,
                                                Byte weight,
                                                String hostname,
                                                IPPort port,
                                                TransportTypes transport,
                                                String uriPrefix,
                                                HTTPContentType contentType,
                                                ProtocolTypes protocolType,
                                                IEnumerable <String> PublicKeys)
        {
            return(new RoamingNetworkInfo(TrackerId,
                                          "",
                                          ExpiredAfter,
                                          RoamingNetwork.Id,
                                          priority,
                                          weight,
                                          hostname,
                                          port,
                                          transport,
                                          uriPrefix,
                                          contentType,
                                          protocolType,
                                          PublicKeys));
        }
Beispiel #2
0
        public RoamingNetworkInfo(Tracker_Id TrackerId,
                                  String IncomingURI,
                                  DateTime ExpiredAfter,

                                  RoamingNetwork_Id RoamingNetworkId,
                                  Byte priority,
                                  Byte weight,
                                  String hostname,
                                  IPPort port,
                                  TransportTypes transport,
                                  String uriPrefix,
                                  HTTPContentType contentType,
                                  ProtocolTypes protocolType,
                                  IEnumerable <String> PublicKeys)
        {
            this.TrackerId    = TrackerId;
            this.IncomingURI  = IncomingURI;
            this.ExpiredAfter = ExpiredAfter;

            this.RoamingNetworkId = RoamingNetworkId;

            this.priority     = priority;
            this.weight       = weight;
            this.hostname     = hostname;
            this.port         = port;
            this.transport    = transport;
            this.uriPrefix    = uriPrefix;
            this.contentType  = contentType;
            this.protocolType = protocolType;
            this.publicKeys   = PublicKeys;

            this.AnnouncedURI = String.Concat(transport, "://", hostname, ":", port, uriPrefix, "_", contentType);
        }
Beispiel #3
0
        public RoamingNetworkInfo(Tracker_Id TrackerId,
                                  String IncomingURI,
                                  DateTime ExpiredAfter,

                                  RoamingNetwork RoamingNetwork,
                                  Byte priority,
                                  Byte weight,
                                  String hostname,
                                  IPPort port,
                                  TransportTypes transport,
                                  String uriPrefix,
                                  HTTPContentType contentType,
                                  ProtocolTypes protocolType,
                                  IEnumerable <String> PublicKeys)

            : this(TrackerId,
                   IncomingURI,
                   ExpiredAfter,

                   RoamingNetwork.Id,
                   priority,
                   weight,
                   hostname,
                   port,
                   transport,
                   uriPrefix,
                   contentType,
                   protocolType,
                   PublicKeys)

        {
            this.RoamingNetwork = RoamingNetwork;
        }
Beispiel #4
0
        public Tracker(Tracker_Id Id,
                       I18NString Description,
                       HTTPServer <RoamingNetworks, RoamingNetwork> HTTPServer,
                       HTTPPath?URIPrefix = null)
        {
            #region Initial checks

            if (Id.IsNullOrEmpty)
            {
                throw new ArgumentNullException(nameof(Id), "The given tracker client identification must not be null or empty!");
            }

            #endregion

            this.Id                    = Id;
            this.Description           = Description ?? I18NString.Empty;
            this.HTTPServer            = HTTPServer ?? throw new ArgumentNullException(nameof(HTTPServer), "The given HTTP server must not be null!");
            this.URIPrefix             = URIPrefix ?? DefaultURIPrefix;
            this._Logins               = new Dictionary <String, String>();
            this._LocalRoamingNetworks = new ConcurrentDictionary <RoamingNetwork_Id, List <RoamingNetworkInfo> >();

            RegisterURITemplates();
        }