public BinaryConnectionListener (IWampBinaryBinding <TMessage> binding, TextBinaryTransport <TConnection> parent) : base(parent) { Binding = binding; }
public WampAuthenticationBinaryBinding(IWampBinaryBinding <TMessage> binding, IWampSessionAuthenticatorFactory sessionAuthenticationFactory, IWampUriValidator uriValidator) : base(binding, sessionAuthenticationFactory, uriValidator) { mBinding = binding; }
public VtortolaWampBinaryConnection(WebSocket connection, IWampBinaryBinding <TMessage> binding, ICookieAuthenticatorFactory cookieAuthenticatorFactory) : base(connection, cookieAuthenticatorFactory) { mBinding = binding; }
public BinaryNetMQConnection(IWampBinaryBinding <TMessage> binding, NetMQSocket socket, NetMQScheduler scheduler) { _binding = binding; _socket = socket; _scheduler = scheduler; _socket.ReceiveReady += OnReceiveMessage; }
private IWampConnectionListener <TMessage> GetListener <TMessage>(IWampBinaryBinding <TMessage> binding) { BinaryConnectionListener <TMessage> listener = new BinaryConnectionListener <TMessage>(binding, this); RegisterBinding(binding, listener); return(listener); }
protected override IWampConnection <TMessage> CreateBinaryConnection <TMessage> (WebSocketData connection, IWampBinaryBinding <TMessage> binding) { return(new VtortolaWampBinaryConnection <TMessage>(connection.WebSocket, connection.CancellationToken, binding, AuthenticatorFactory)); }
public BinaryWebSocketWrapperConnection(IWebSocketWrapper webSocket, IWampBinaryBinding <TMessage> binding, ICookieProvider cookieProvider, ICookieAuthenticatorFactory cookieAuthenticatorFactory, int?maxFrameSize) : base(webSocket, binding, cookieProvider, cookieAuthenticatorFactory, maxFrameSize) { mBinding = binding; }
public FleckWampBinaryConnection(IWebSocketConnection webSocketConnection, IWampBinaryBinding <TMessage> binding, ICookieAuthenticatorFactory cookieAuthenticatorFactory) : base(webSocketConnection, cookieAuthenticatorFactory) { mBinding = binding; webSocketConnection.OnBinary = OnConnectionMessage; }
/// <summary> /// Creates a <see cref="IWampChannel"/> that connects to a given realm, /// using the given address and the given binary binding /// </summary> /// <param name="address">The given address.</param> /// <param name="realm">The given realm to connect to.</param> /// <param name="binding">The given binary binding.</param> /// <returns></returns> public IWampChannel CreateChannel <TMessage>(string address, string realm, IWampBinaryBinding <TMessage> binding) { Func <IControlledWampConnection <TMessage> > connectionFactory = () => new WebSocket4NetBinaryConnection <TMessage>(address, binding); return(this.CreateChannel(realm, connectionFactory, binding)); }
/// <exclude /> protected override IWampConnection <TMessage> CreateBinaryConnection <TMessage> (WebSocketData connection, IWampBinaryBinding <TMessage> binding) { return(new BinaryWebSocketConnection <TMessage>(connection.WebSocket, binding, new AspNetCookieProvider(connection.HttpContext), AuthenticatorFactory)); }
/// <summary> /// Creates a <see cref="IWampChannel"/> that connects to a given realm, /// using the given address and the given binary binding /// </summary> /// <param name="address">The given address.</param> /// <param name="realm">The given realm to connect to.</param> /// <param name="binding">The given binary binding.</param> /// <param name="authenticator">The authenticator object to handle CHALLENGE request.</param> /// <returns></returns> public IWampChannel CreateChannel <TMessage>(string address, string realm, IWampBinaryBinding <TMessage> binding, IWampClientAuthenticator authenticator) { Func <IControlledWampConnection <TMessage> > connectionFactory = () => new ControlledBinaryWebSocketConnection <TMessage>(new Uri(address), binding, null); return(this.CreateChannel(realm, connectionFactory, binding, authenticator)); }
protected override IWampConnection <TMessage> CreateBinaryConnection <TMessage> (WebSocketData connection, IWampBinaryBinding <TMessage> binding) { return(new BinaryWebSocketWrapperConnection <TMessage> (new OwinWebSocketWrapper(connection.WebSocketContext), binding, new OwinCookieProvider(connection.OwinContext), AuthenticatorFactory, mMaxFrameSize)); }
protected override IWampConnection <TMessage> CreateBinaryConnection <TMessage> (WebSocketData connection, IWampBinaryBinding <TMessage> binding) { ConfigureComputeBytes(binding); return(new BinaryWebSocketConnection <TMessage> (connection.WebSocket, binding, new AspNetCoreCookieProvider(connection.HttpContext), AuthenticatorFactory, mMaxFrameSize)); }
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"); }
private IControlledWampConnection <TMessage> GetConnectionFactory <TMessage>(IWampBinding <TMessage> binding) { IWampTextBinding <TMessage> textBinding = binding as IWampTextBinding <TMessage>; if (textBinding != null) { return(CreateTextConnection(textBinding)); } IWampBinaryBinding <TMessage> binaryBinding = binding as IWampBinaryBinding <TMessage>; if (binaryBinding != null) { return(CreateBinaryConnection(binaryBinding)); } throw new Exception(); }
protected override IWampConnection <TMessage> CreateBinaryConnection <TMessage>(SocketData connection, IWampBinaryBinding <TMessage> binding) { return(CreateConnection(connection, binding)); }
protected IControlledWampConnection <TMessage> CreateBinaryConnection <TMessage>(IWampBinaryBinding <TMessage> binaryBinding) { return(new ControlledBinaryWebSocketConnection <TMessage>(ActivateWebSocket(), mServerAddress, binaryBinding)); }
/// <summary> /// Creates a new instance of <see cref="WebSocket4NetBinaryConnection{TMessage}"/> /// given the server address to connect to and the binary binding to use. /// </summary> /// <param name="serverAddress">The server address to connect to.</param> /// <param name="binding">The <see cref="IWampBinaryBinding{TMessage}"/> to use.</param> public WebSocket4NetBinaryConnection(string serverAddress, IWampBinaryBinding <TMessage> binding) : base(serverAddress, binding) { mBinding = binding; WebSocket.DataReceived += OnDataReceived; }
/// <summary> /// Creates a new instance of <see cref="WebSocket4NetBinaryConnection{TMessage}"/> /// given the underlying <see cref="WebSocket"/> to use and the binary binding to use. /// </summary> /// <param name="webSocket">The underlying <see cref="WebSocket"/> to use..</param> /// <param name="binding">The <see cref="IWampTextBinding{TMessage}"/> to use.</param> public WebSocket4NetBinaryConnection(WebSocket webSocket, IWampBinaryBinding <TMessage> binding) : base(webSocket, binding) { mBinding = binding; WebSocket.DataReceived += OnDataReceived; }
public ControlledBinaryWebSocketConnection(Uri addressUri, IWampBinaryBinding <TMessage> binding) : this(new ClientWebSocket(), addressUri, binding) { }
protected override IWampConnection <TMessage> CreateBinaryConnection <TMessage>(IWebSocketConnection connection, IWampBinaryBinding <TMessage> binding) { return(new FleckWampBinaryConnection <TMessage>(connection, binding, AuthenticatorFactory)); }
public BinaryWebSocketConnection(WebSocket webSocket, IWampBinaryBinding <TMessage> binding, ICookieProvider cookieProvider, ICookieAuthenticatorFactory cookieAuthenticatorFactory) : base(webSocket, binding, cookieProvider, cookieAuthenticatorFactory) { mBinding = binding; }
protected IControlledWampConnection <TMessage> CreateBinaryConnection <TMessage>(IWampBinaryBinding <TMessage> binaryBinding) { return(new WebSocket4NetBinaryConnection <TMessage>(mWebSocketFactory(binaryBinding.Name), binaryBinding)); }
protected BinaryWebSocketWrapperConnection(IClientWebSocketWrapper clientWebSocket, Uri addressUri, IWampBinaryBinding <TMessage> binding) : base(clientWebSocket, addressUri, binding.Name, binding) { mBinding = binding; }
public MessageWebSocketBinaryConnection(string uri, IWampBinaryBinding <TMessage> binding) : base(uri, binding, SocketMessageType.Binary) { mBinaryBinding = binding; }
protected BinaryWebSocketConnection(ClientWebSocket clientWebSocket, Uri addressUri, IWampBinaryBinding <TMessage> binding, int?maxFrameSize) : base(new ClientWebSocketWrapper(clientWebSocket), addressUri, binding, maxFrameSize) { }
public ControlledBinaryWebSocketConnection(ClientWebSocket clientWebSocket, Uri addressUri, IWampBinaryBinding <TMessage> binding) : base(clientWebSocket, addressUri, binding) { }
protected BinaryWebSocketConnection(Uri addressUri, IWampBinaryBinding <TMessage> binding) : base(addressUri, binding.Name, binding) { mBinding = binding; }
/// <summary> /// Creates a binary <see cref="IWampConnection{TMessage}"/> using the given /// binding and the given connection. /// </summary> /// <param name="connection">The given connection.</param> /// <param name="binding">The given binding.</param> protected abstract IWampConnection <TMessage> CreateBinaryConnection <TMessage> (TConnection connection, IWampBinaryBinding <TMessage> binding);
private IWampBinding CreateAuthenticationBinding <TMessage> (IWampBinaryBinding <TMessage> binding) { return(new WampAuthenticationBinaryBinding <TMessage>(binding, mSessionAuthenticationFactory, this.UriValidator)); }