public TextWebSocketWrapperConnection(IWebSocketWrapper webSocket, IWampTextBinding <TMessage> binding, ICookieProvider cookieProvider, ICookieAuthenticatorFactory cookieAuthenticatorFactory, int?maxFrameSize) : base(webSocket, binding, cookieProvider, cookieAuthenticatorFactory, maxFrameSize) { mBinding = binding; }
public TextConnectionListener (IWampTextBinding <TMessage> binding, TextBinaryTransport <TConnection> parent) : base(parent) { Binding = binding; }
public VtortolaWampTextConnection(WebSocket connection, IWampTextBinding <TMessage> binding, ICookieAuthenticatorFactory cookieAuthenticatorFactory) : base(connection, cookieAuthenticatorFactory) { mBinding = binding; }
public WampAuthenticationTextBinding(IWampTextBinding <TMessage> binding, IWampSessionAuthenticatorFactory sessionAuthenticationFactory, IWampUriValidator uriValidator) : base(binding, sessionAuthenticationFactory, uriValidator) { mBinding = binding; }
private IWampConnectionListener <TMessage> GetListener <TMessage>(IWampTextBinding <TMessage> binding) { TextConnectionListener <TMessage> listener = new TextConnectionListener <TMessage>(binding, this); RegisterBinding(binding, listener); return(listener); }
public FleckWampConnectionListener(string location, IWampTextBinding <TMessage> binding, X509Certificate2 certificate = null) { mLocation = location; mBinding = binding; mCertificate = certificate; }
public FleckWampTextConnection(IWebSocketConnection webSocketConnection, IWampTextBinding <TMessage> binding, ICookieAuthenticatorFactory cookieAuthenticatorFactory = null) : base(webSocketConnection, cookieAuthenticatorFactory) { mBinding = binding; webSocketConnection.OnMessage = OnConnectionMessage; }
public SignalRTextConnection(IConnection connection, string connectionId, SignalRConnectionListenerAdapter <TMessage> parent) { mConnection = connection; mConnectionId = connectionId; mBinding = parent.mBinding; mParent = parent; }
/// <summary> /// Creates a <see cref="IWampChannel"/> that connects to a given realm, /// using the given address and the given text binding /// </summary> /// <param name="address">The given address.</param> /// <param name="realm">The given realm to connect to.</param> /// <param name="binding">The given text binding.</param> /// <returns></returns> public IWampChannel CreateChannel <TMessage>(string address, string realm, IWampTextBinding <TMessage> binding) { Func <IControlledWampConnection <TMessage> > connectionFactory = () => new WebSocket4NetTextConnection <TMessage>(address, binding); return(this.CreateChannel(realm, connectionFactory, binding)); }
/// <summary> /// Creates a <see cref="IWampChannel"/> that connects to a given realm, /// using the given address and the given text binding /// </summary> /// <param name="address">The given address.</param> /// <param name="realm">The given realm to connect to.</param> /// <param name="binding">The given text binding.</param> /// <returns></returns> public IWampChannel CreateChannel <TMessage>(string address, string realm, IWampTextBinding <TMessage> binding) { var connection = new MessageWebSocketTextConnection <TMessage>(address, binding); return(this.CreateChannel(realm, connection, binding)); }
/// <exclude /> protected override IWampConnection <TMessage> CreateTextConnection <TMessage> (WebSocketData connection, IWampTextBinding <TMessage> binding) { return(new TextWebSocketConnection <TMessage>(connection.WebSocket, binding, new AspNetCookieProvider(connection.HttpContext), AuthenticatorFactory)); }
public FleckWampConnectionListener(string location, IWampTextBinding <TMessage> binding, X509Certificate2 certificate, Func <SslProtocols> getEnabledSslProtocols) { mLocation = location; mBinding = binding; mCertificate = certificate; mGetEnabledSslProtocols = getEnabledSslProtocols; }
/// <summary> /// Creates a <see cref="IWampChannel"/> that connects to a given realm, /// using the given address and the given text binding /// </summary> /// <param name="address">The given address.</param> /// <param name="realm">The given realm to connect to.</param> /// <param name="binding">The given text binding.</param> /// <param name="authenticator">The authenticator object to handle CHALLENGE request.</param> /// <returns></returns> public IWampChannel CreateChannel <TMessage>(string address, string realm, IWampTextBinding <TMessage> binding, IWampClientAuthenticator authenticator) { Func <IControlledWampConnection <TMessage> > connectionFactory = () => new ControlledTextWebSocketConnection <TMessage>(new Uri(address), binding, null); return(this.CreateChannel(realm, connectionFactory, binding, authenticator)); }
/// <summary> /// Creates a new instance of <see cref="SignalRTextConnection{TMessage}"/>. /// </summary> /// <param name="uri">The uri of the server to connect to.</param> /// <param name="binding">The binding to use.</param> /// <param name="transport">The <see cref="IClientTransport"/> to use.</param> public SignalRTextConnection(string uri, IWampTextBinding <TMessage> binding, IClientTransport transport) { mBinding = binding; mTransport = transport; mConnection = new Connection(uri); mConnection.Closed += OnClosed; mConnection.Error += OnError; mConnection.Received += OnReceived; }
/// <exclude /> protected override IWampConnection <TMessage> CreateTextConnection <TMessage> (WebSocketData connection, IWampTextBinding <TMessage> binding) { return(new TextWebSocketConnection <TMessage>(connection.Context.WebSocket, binding, new HttpListenerCookieProvider(connection.Context), AuthenticatorFactory, mMaxFrameSize)); }
private IControlledWampConnection <TMessage> GetConnectionFactory <TMessage>(IWampBinding <TMessage> binding) { IWampTextBinding <TMessage> textBinding = binding as IWampTextBinding <TMessage>; if (textBinding != null) { return(CreateTextConnection(textBinding)); } throw new Exception(); }
private WebSocket ActivateWebSocket <TMessage>(IWampTextBinding <TMessage> textBinding) { WebSocket webSocket = mWebSocketFactory(textBinding.Name); if (SecurityOptionsConfigureAction != null) { SecurityOptionsConfigureAction(webSocket.Security); } return(webSocket); }
protected override IWampConnection <TMessage> CreateTextConnection <TMessage> (WebSocketData connection, IWampTextBinding <TMessage> binding) { ConfigureComputeBytes(binding); return(new TextWebSocketConnection <TMessage> (connection.WebSocket, binding, new AspNetCoreCookieProvider(connection.HttpContext), AuthenticatorFactory, mMaxFrameSize)); }
private IWampConnectionListener <TMessage> GetListener <TMessage>(IWampTextBinding <TMessage> binding) { if (mListener != null) { throw new ArgumentException("Listener already set."); } else { SignalRConnectionListener <TMessage> result = new SignalRConnectionListener <TMessage>(mUrl, binding, mEnableCORS, mEnableJSONP, mPathMatch); mListener = result; return(result); } }
public IWampConnectionListener <TMessage> GetListener <TMessage>(IWampBinding <TMessage> binding) { IWampTextBinding <TMessage> textBinding = binding as IWampTextBinding <TMessage>; if (textBinding == null) { throw new ArgumentException("This transport supports only text binding.", "binding"); } else { return(GetListener(textBinding)); } }
public IWampConnectionListener <TMessage> GetListener <TMessage>(IWampBinding <TMessage> binding) { IWampTextBinding <TMessage> textBinding = binding as IWampTextBinding <TMessage>; if (textBinding != null) { return(GetListener(textBinding)); } IWampBinaryBinding <TMessage> binaryBinding = binding as IWampBinaryBinding <TMessage>; if (binaryBinding != null) { return(GetListener(binaryBinding)); } throw new ArgumentException("WebSockets can only deal with binary/text transports", "binding"); }
protected TextWebSocketWrapperConnection(IClientWebSocketWrapper clientWebSocket, Uri addressUri, IWampTextBinding <TMessage> binding) : base(clientWebSocket, addressUri, binding.Name, binding) { mBinding = binding; }