示例#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;
        }
示例#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;
        }
示例#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 };
        }
示例#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
            };
        }