Amqp.Listener.ConnectionListener.WebSocketTransportListener.WebSocketTransportListener C# (CSharp) Method

WebSocketTransportListener() public method

public WebSocketTransportListener ( ConnectionListener listener, string host, int port, string path, X509Certificate2 certificate ) : System
listener ConnectionListener
host string
port int
path string
certificate System.Security.Cryptography.X509Certificates.X509Certificate2
return System
            public WebSocketTransportListener(ConnectionListener listener, string host, int port, string path, X509Certificate2 certificate)
            {
                this.listener = listener;

                // if certificate is set, it must be bound to host:port by netsh http command
                string address = string.Format("{0}://{1}:{2}{3}", certificate == null ? "http" : "https", host, port, path);
                this.httpListener = new HttpListener();
                this.httpListener.Prefixes.Add(address);
            }