/// <summary> /// Creates a new instance of <see cref="FleckWebSocketTransport"/> /// given the server address to run at. /// </summary> /// <param name="location">The given server address.</param> /// <param name="cookieAuthenticatorFactory"></param> /// <param name="certificate">The <see cref="X509Certificate2"/> certificate to use for secured websockets.</param> /// <param name="supportDualStack">IPv4/IPv6 dual stack support</param> protected FleckWebSocketTransport(string location, ICookieAuthenticatorFactory cookieAuthenticatorFactory = null, X509Certificate2 certificate = null, bool supportDualStack = true) : this(location : location, cookieAuthenticatorFactory : null, certificate : certificate, supportDualStack : supportDualStack, getEnabledSslProtocols : null) { }
public FleckAuthenticatedWebSocketTransport (string location, ICookieAuthenticatorFactory cookieAuthenticatorFactory = null, X509Certificate2 certificate = null) : base(location, cookieAuthenticatorFactory, certificate) { }
public FleckAuthenticatedWebSocketTransport (string location, ICookieAuthenticatorFactory cookieAuthenticatorFactory = null, X509Certificate2 certificate = null) : this(location : location, cookieAuthenticatorFactory : cookieAuthenticatorFactory, certificate : certificate, getEnabledSslProtocols : null) { }
public TextWebSocketWrapperConnection(IWebSocketWrapper webSocket, IWampTextBinding <TMessage> binding, ICookieProvider cookieProvider, ICookieAuthenticatorFactory cookieAuthenticatorFactory, int?maxFrameSize) : base(webSocket, binding, cookieProvider, cookieAuthenticatorFactory, maxFrameSize) { mBinding = binding; }
public VtortolaWampBinaryConnection(WebSocket connection, IWampBinaryBinding <TMessage> binding, ICookieAuthenticatorFactory cookieAuthenticatorFactory) : base(connection, cookieAuthenticatorFactory) { mBinding = binding; }
public FleckWampTextConnection(IWebSocketConnection webSocketConnection, IWampTextBinding <TMessage> binding, ICookieAuthenticatorFactory cookieAuthenticatorFactory = null) : base(webSocketConnection, cookieAuthenticatorFactory) { mBinding = binding; webSocketConnection.OnMessage = OnConnectionMessage; }
public AspNetCoreWebSocketTransport (IApplicationBuilder app, ICookieAuthenticatorFactory authenticatorFactory = null) : base(authenticatorFactory) { mHandler = this.EmptyHandler; app.Use(HttpHandler); }
public FleckAuthenticatedWebSocketTransport (string location, ICookieAuthenticatorFactory cookieAuthenticatorFactory = null, X509Certificate2 certificate = null, Func <SslProtocols> getEnabledSslProtocols = null) : base(location, cookieAuthenticatorFactory, certificate, getEnabledSslProtocols) { }
public VtortolaAuthenticatedWebSocketTransport (IPEndPoint endpoint, bool perMessageDeflate, ICookieAuthenticatorFactory authenticatorFactory, X509Certificate2 certificate = null) : base(endpoint, perMessageDeflate, authenticatorFactory, certificate) { }
/// <summary> /// Creates a new instance of <see cref="VtortolaWebSocketTransport"/> /// given the endpoint to run at. /// </summary> /// <param name="endpoint"></param> /// <param name="perMessageDeflate">A value indicating whether to support permessage-deflate /// compression extension or not.</param> /// <param name="authenticatorFactory"></param> /// <param name="certificate"></param> protected VtortolaWebSocketTransport (IPEndPoint endpoint, bool perMessageDeflate, ICookieAuthenticatorFactory authenticatorFactory = null, X509Certificate2 certificate = null) : base(authenticatorFactory) { mEndpoint = endpoint; mPerMessageDeflate = perMessageDeflate; mCertificate = certificate; }
public VtortolaWampTextConnection(WebSocket connection, CancellationToken cancellationToken, IWampTextBinding <TMessage> binding, ICookieAuthenticatorFactory cookieAuthenticatorFactory) : base(connection, cancellationToken, cookieAuthenticatorFactory) { mBinding = binding; }
protected VtortolaWampConnection(WebSocket websocket, ICookieAuthenticatorFactory cookieAuthenticatorFactory) : base(new CookieCollectionCookieProvider(websocket.HttpRequest.Cookies), cookieAuthenticatorFactory) { mWebsocket = websocket; mTransportDetails = new VtortolaTransportDetails(mWebsocket); }
/// <exclude /> public HttpListenerWebSocketTransport (string url, Action <HttpListenerContext> onUnknownRequest = null, ICookieAuthenticatorFactory authenticatorFactory = null) : base(authenticatorFactory) { mUrl = url; mOnUnknownRequest = onUnknownRequest ?? CancelRequest; }
public OwinWebSocketTransport (IAppBuilder app, int?maxFrameSize, ICookieAuthenticatorFactory authenticatorFactory = null) : base(authenticatorFactory) { mHandler = this.EmptyHandler; app.Use(HttpHandler); mMaxFrameSize = maxFrameSize; }
/// <summary> /// Creates a new instance of <see cref="FleckWebSocketTransport"/> /// given the server address to run at. /// </summary> /// <param name="location">The given server address.</param> /// <param name="cookieAuthenticatorFactory"></param> /// <param name="certificate"></param> protected FleckWebSocketTransport(string location, ICookieAuthenticatorFactory cookieAuthenticatorFactory = null, X509Certificate2 certificate = null) : base(cookieAuthenticatorFactory) { mServer = new WebSocketServer(location); mServer.Certificate = certificate; RouteLogs(); }
public WebSocketWrapperConnection(IWebSocketWrapper webSocket, IWampMessageParser <TMessage, TRaw> parser, ICookieProvider cookieProvider, ICookieAuthenticatorFactory cookieAuthenticatorFactory, int?maxFrameSize) : base(cookieProvider, cookieAuthenticatorFactory) { mWebSocket = webSocket; mParser = parser; mMaxFrameSize = maxFrameSize; mCancellationTokenSource = new CancellationTokenSource(); mCancellationToken = mCancellationTokenSource.Token; }
/// <summary> /// Initializes a new instance of <see cref="DefaultWampHost"/> listening at /// the given location with the given bindings and the given /// <see cref="IWampRealmContainer"/>. /// </summary> /// <param name="location">The given location.</param> /// <param name="sessionAuthenticationFactory">The <see cref="IWampSessionAuthenticatorFactory"/> /// used to accept pending clients.</param> /// <param name="cookieAuthenticatorFactory">The given <see cref="ICookieAuthenticatorFactory"/> used to authenticate /// users given their cookies.</param> /// <param name="certificate">The <see cref="X509Certificate2"/> certificate to use for secured websockets.</param> public DefaultWampAuthenticationHost (string location, IWampSessionAuthenticatorFactory sessionAuthenticationFactory, ICookieAuthenticatorFactory cookieAuthenticatorFactory = null, X509Certificate2 certificate = null) : this(location : location, sessionAuthenticationFactory : sessionAuthenticationFactory, bindings : null, cookieAuthenticatorFactory : cookieAuthenticatorFactory, certificate : certificate) { }
public AsyncWebSocketWampConnection (ICookieProvider cookieProvider, ICookieAuthenticatorFactory cookieAuthenticatorFactory = null) { if (cookieAuthenticatorFactory != null) { IWampSessionAuthenticator authenticator = cookieAuthenticatorFactory.CreateAuthenticator(cookieProvider); mAuthenticator = authenticator; } }
/// <summary> /// Initializes a new instance of <see cref="DefaultWampHost"/> listening at /// the given location with the given bindings and the given /// <see cref="IWampRealmContainer"/>. /// </summary> /// <param name="location">The given location.</param> /// <param name="sessionAuthenticationFactory"></param> /// <param name="bindings">The given bindings.</param> /// <param name="cookieAuthenticatorFactory"></param> /// <param name="certificate"></param> public DefaultWampAuthenticationHost (string location, IWampSessionAuthenticatorFactory sessionAuthenticationFactory, IEnumerable <IWampBinding> bindings = null, ICookieAuthenticatorFactory cookieAuthenticatorFactory = null, X509Certificate2 certificate = null) : this(location : location, sessionAuthenticationFactory : sessionAuthenticationFactory, realmContainer : null, uriValidator : null, bindings : bindings, cookieAuthenticatorFactory : cookieAuthenticatorFactory, certificate : certificate) { }
/// <summary> /// Initializes a new instance of <see cref="DefaultWampHost"/> listening at /// the given location with the given bindings and the given /// <see cref="IWampRealmContainer"/>. /// </summary> /// <param name="location">The given location.</param> /// <param name="sessionAuthenticationFactory">The <see cref="IWampSessionAuthenticatorFactory"/> /// used to accept pending clients.</param> /// <param name="realmContainer">The <see cref="IWampRealmContainer"/> associated with this /// host.</param> /// <param name="uriValidator">The <see cref="IWampUriValidator"/> used to validate uris.</param> /// <param name="bindings">The given bindings.</param> /// <param name="cookieAuthenticatorFactory">The given <see cref="ICookieAuthenticatorFactory"/> used to authenticate /// users given their cookies.</param> /// <param name="certificate">The <see cref="X509Certificate2"/> certificate to use for secured websockets.</param> public DefaultWampAuthenticationHost(string location, IWampSessionAuthenticatorFactory sessionAuthenticationFactory, IWampRealmContainer realmContainer = null, IWampUriValidator uriValidator = null, IEnumerable <IWampBinding> bindings = null, ICookieAuthenticatorFactory cookieAuthenticatorFactory = null, X509Certificate2 certificate = null) : base(sessionAuthenticationFactory, realmContainer, uriValidator) { bindings = bindings ?? new IWampBinding[] { new JTokenJsonBinding(), new JTokenMsgpackBinding() }; this.RegisterTransport( new FleckAuthenticatedWebSocketTransport(location, cookieAuthenticatorFactory, certificate), bindings.ToArray()); }
/// <summary> /// Creates a new instance of <see cref="FleckWebSocketTransport"/> /// given the server address to run at. /// </summary> /// <param name="location">The given server address.</param> /// <param name="cookieAuthenticatorFactory"></param> /// <param name="certificate">The <see cref="X509Certificate2"/> certificate to use for secured websockets.</param> /// <param name="getEnabledSslProtocols"> If non-null, used to set Fleck's EnabledSslProtocols. </param> protected FleckWebSocketTransport(string location, ICookieAuthenticatorFactory cookieAuthenticatorFactory = null, X509Certificate2 certificate = null, Func <SslProtocols> getEnabledSslProtocols = null) : base(cookieAuthenticatorFactory) { mServer = new WebSocketServer(location); mServer.Certificate = certificate; if (getEnabledSslProtocols != null) { mServer.EnabledSslProtocols = getEnabledSslProtocols(); } RouteLogs(); }
public FleckWampConnection(IWebSocketConnection webSocketConnection, ICookieAuthenticatorFactory cookieAuthenticatorFactory, TimeSpan?autoSendPingInterval = null) : base(new FleckCookieProvider(webSocketConnection.ConnectionInfo), cookieAuthenticatorFactory) { mWebSocketConnection = webSocketConnection; mPingPongHandler = new PingPongHandler(mLogger, new FleckPinger(webSocketConnection), autoSendPingInterval ?? TimeSpan.FromSeconds(45)); mWebSocketConnection.OnOpen = OnConnectionOpen; mWebSocketConnection.OnError = OnConnectionError; mWebSocketConnection.OnClose = OnConnectionClose; mTransportDetails = new FleckTransportDetails(mWebSocketConnection.ConnectionInfo); }
public WebSocketTransport(ICookieAuthenticatorFactory authenticatorFactory) { AuthenticatorFactory = authenticatorFactory; }
/// <exclude /> public AspNetWebSocketTransport(string url, ICookieAuthenticatorFactory authenticatorFactory = null) : base(authenticatorFactory) { mUrl = url; }
public BinaryWebSocketConnection(WebSocket webSocket, IWampBinaryBinding <TMessage> binding, ICookieProvider cookieProvider, ICookieAuthenticatorFactory cookieAuthenticatorFactory) : base(webSocket, binding, cookieProvider, cookieAuthenticatorFactory) { mBinding = binding; }
public WebSocketWrapperConnection(IWebSocketWrapper webSocket, IWampStreamingMessageParser <TMessage> parser, ICookieProvider cookieProvider, ICookieAuthenticatorFactory cookieAuthenticatorFactory) : base(cookieProvider, cookieAuthenticatorFactory) { mWebSocket = webSocket; mParser = parser; mCancellationTokenSource = new CancellationTokenSource(); }
public VtortolaAuthenticatedWebSocketTransport (IPEndPoint endpoint, bool perMessageDeflate, ICookieAuthenticatorFactory authenticatorFactory, WebSocketListenerOptions options) : this(endpoint, perMessageDeflate, authenticatorFactory, null, options) { }
public BinaryWebSocketConnection(WebSocket webSocket, IWampBinaryBinding <TMessage> binding, ICookieProvider cookieProvider, ICookieAuthenticatorFactory cookieAuthenticatorFactory, int?maxFrameSize) : base(new WebSocketWrapper(webSocket), binding, cookieProvider, cookieAuthenticatorFactory, maxFrameSize) { }
public TextWebSocketConnection(WebSocket webSocket, IWampTextBinding <TMessage> binding, ICookieProvider cookieProvider, ICookieAuthenticatorFactory cookieAuthenticatorFactory) : base(new WebSocketWrapper(webSocket), binding, cookieProvider, cookieAuthenticatorFactory) { }