Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SsdpSearch"/> class.
        /// </summary>
        public SsdpSearch(ISsdpSocket socket = null)
        {
            if (socket == null)
            {
                socket          = new SsdpSocket();
                this.OwnsServer = true;
            }

            this.Server       = socket;
            this.HostEndpoint = Protocol.DiscoveryEndpoints.IPv4;
            this.SearchType   = Protocol.SsdpAll;
            this.Mx           = Protocol.DefaultMx;
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SsdpSearch"/> class.
        /// </summary>
        public SsdpSearch(ISsdpSocket socket = null)
        {
            if (socket == null)
            {
                socket = new SsdpSocket();
                this.OwnsServer = true;
            }

            this.Server = socket;
            this.HostEndpoint = Protocol.DiscoveryEndpoints.IPv4;
            this.SearchType = Protocol.SsdpAll;
            this.Mx = Protocol.DefaultMx;
        }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SsdpAnnouncer"/> class.
        /// </summary>
        /// <param name="server">The server.</param>
        public SsdpAnnouncer(SsdpSocket server = null)
        {
            if (server == null)
            {
                server = new SsdpSocket();
                this.OwnsServer = true;
            }

            this.Server = server;
            this.UserAgent = Protocol.DefaultUserAgent;
            this.MaxAge = Protocol.DefaultMaxAge;
            this.NotificationType = string.Empty;
            this.Location = string.Empty;
            this.USN = string.Empty;
            this.RemoteEndPoints = new SyncCollection<IPEndPoint>() { Protocol.DiscoveryEndpoints.IPv4, Protocol.DiscoveryEndpoints.Broadcast };
        }
Esempio n. 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SsdpAnnouncer"/> class.
        /// </summary>
        /// <param name="server">The server.</param>
        public SsdpAnnouncer(SsdpSocket server = null)
        {
            if (server == null)
            {
                server          = new SsdpSocket();
                this.OwnsServer = true;
            }

            this.Server           = server;
            this.UserAgent        = Protocol.DefaultUserAgent;
            this.MaxAge           = Protocol.DefaultMaxAge;
            this.NotificationType = string.Empty;
            this.Location         = string.Empty;
            this.USN             = string.Empty;
            this.RemoteEndPoints = new SyncCollection <IPEndPoint>()
            {
                Protocol.DiscoveryEndpoints.IPv4, Protocol.DiscoveryEndpoints.Broadcast
            };
        }