Ejemplo n.º 1
0
 public WebSocketListener(Uri locationUri, ServerEtiquette etiquette, X509Certificate serverCertificate)
     : this(locationUri, etiquette)
 {
     if (serverCertificate == null && locationUri.Scheme == UriWeb.UriSchemeWss)
     {
         throw new ArgumentNullException("serverCertificate");
     }
     this.serverCertificate = serverCertificate;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Create new web socket listener
        /// </summary>
        /// <param name="localEndPoint">The local end point address to listen on</param>
        /// <param name="etiquette">Etiquette to use for client-server handshakes</param>
        public WebSocketListener(Uri locationUri, ServerEtiquette etiquette)
        {
            if (locationUri == null)
            {
                throw new ArgumentNullException("locationUri");
            }
            if (etiquette == null)
            {
                throw new ArgumentNullException("etiquette");
            }

            this.etiquette   = etiquette;
            this.locationUri = locationUri;
        }