public BrokerClient( long accessKey, string accessToken, Guid?connectionId, IPAddress ipAddress, string group, string destination, short additionalFlags, SortedDictionary <string, string> tags, IRSocketTransport transport, RSocketOptions options) { this.accessKey = accessKey; this.accessToken = Convert.FromBase64String(accessToken); this.connectionId = connectionId.GetValueOrDefault(Guid.NewGuid()); this.ipAddress = ipAddress; this.group = group; this.destination = destination ?? DEFAULT_DESTINATION; this.additionalFlags = additionalFlags; this.tags = tags; this.tags.Add("com.netifi.destination", this.destination); this.transport = transport; this.options = options; this.client = new RSocketClient(transport, options); }
public RSocketDemoServer(IRSocketTransport transport, RSocketOptions options = default) : base(transport, options) { this.FireAndForgetHandler = this.ForRequestFireAndForget; this.Responder = this.ForRequestResponse; this.Streamer = this.ForRequestStream; this.Channeler = this.ForRequestChannel; }
IRSocketServerConfigurationBuilder IRSocketServerConfigurationBuilder.AddWebSocket() { var contextAccessor = provider.GetRequiredService <IHttpContextAccessor>(); var logger = provider.GetRequiredService <ILogger <WebSocketTransport> >(); var options = new WebSocketOptions(TimeSpan.FromMinutes(5.0d)); transport = new ServerWebSocketTransport(contextAccessor, options, logger); return(this); }
public ShopMeServer( IRSocketTransport transport, RSocketOptions options, ILogger <ShopMeServer> logger) : base(transport, options, logger) { Stream( request => request, request => AsyncEnumerable.Create(ShopLists), result => (result, ReadOnlySequence <byte> .Empty) ); }
public EchoServer(IRSocketTransport transport, RSocketOptions options = default, int echoes = 2) : base(transport, options) { // Request/Response Respond( request => request, // requestTransform request => AsyncEnumerable.Repeat(request, echoes), // producer result => result // resultTransform ); // Request/Stream Stream( request => request, // requestTransform request => AsyncEnumerable.Repeat(request, echoes), // producer result => result // resultTransform ); }
protected IDisposable ChannelSubscription; //TODO Tracking state for channels public RSocketClient(IRSocketTransport transport, RSocketClientOptions options = default) { Transport = transport; Options = options ?? RSocketClientOptions.Default; //TODO Fluent options method here with copied default. Oh, and the default should probably be immutable. }
public RSocket(IRSocketTransport transport, PrefetchOptions options = default) { this.Transport = transport; this.Options = options ?? PrefetchOptions.Default; }
public RSocketClient(IRSocketTransport transport, RSocketOptions options = default) : base(transport, options) { protocolHandler = new ClientProtocolHandler(Dispatcher, Transport.Output, options); }
protected RSocket(IRSocketTransport transport, RSocketOptions options = default) { Dispatcher = new RSocketStreamDispatcher(); Transport = transport; Options = options ?? RSocketOptions.Default; }
public EchoServer(IRSocketTransport transport, RSocketOptions options = default, int echoes = 2) : base(transport, options) { }
public EchoRSocketClient(IRSocketTransport transport, RSocketOptions options = default) : base(transport, options) { }
public EchoServer(IRSocketTransport transport, RSocketOptions options = default, int echoes = 2) : base(transport, options) { this._echoes = echoes; this.Streamer = this.ForRequestStream; }
public EchoServer(IRSocketTransport transport, RSocketOptions options = default, int echoes = 2) : base(transport, options) { Stream(request => request, request => AsyncEnumerable.Repeat(request, echoes), result => result); }
public RSocketDemoClient(IRSocketTransport transport, RSocketOptions options = default) : base(transport, options) { this.FireAndForgetHandler = this.ForRequestFireAndForget; }
public RSocketServer(IRSocketTransport transport, PrefetchOptions options = default) : base(transport, options) { }
public RSocketServerConfiguration(IRSocketTransport transport) { Transport = transport; Options = new RSocketOptions(); }
public RSocketClientReactive(IRSocketTransport transport, RSocketClientOptions options = default) : base(transport, options) { }
public TestServer(IRSocketTransport transport) : base(transport) { }
protected IDisposable ChannelSubscription; //TODO Tracking state for channels public RSocket(IRSocketTransport transport, RSocketOptions options = default) { Transport = transport; Options = options ?? RSocketOptions.Default; }
public RSocketClient(IRSocketTransport transport, RSocketOptions options = default) : base(transport, options) { this.Options = options ?? RSocketOptions.Default; }