Пример #1
0
        async Task ConnectAsync(RSocketOptions options, ReadOnlySequence <byte> metadata, ReadOnlySequence <byte> data)
        {
            await Transport.StartAsync();

            Handler = Connect(CancellationToken.None);
            await Setup(options.KeepAlive, options.Lifetime, options.MetadataMimeType, options.DataMimeType, data: data, metadata : metadata);
        }
Пример #2
0
        public async Task ConnectAsync(RSocketOptions options, ReadOnlySequence <byte> metadata, ReadOnlySequence <byte> data, byte[] resumeToken = default)
        {
            await this.Transport.StartAsync();

            this.Handler = Connect(CancellationToken.None);
            await Setup(options.KeepAlive, options.Lifetime, options.MetadataMimeType, options.DataMimeType, resumeToken : resumeToken, data : data, metadata : metadata);

            this.StartKeepAlive(options.KeepAlive, options.Lifetime);
        }
Пример #3
0
        protected IDisposable ChannelSubscription;              //TODO Tracking state for channels

        public RSocket(IRSocketTransport transport, RSocketOptions options = default)
        {
            Transport = transport;
            Options   = options ?? RSocketOptions.Default;
        }
Пример #4
0
 public Task ConnectAsync(RSocketOptions options = default, byte[] data = default, byte[] metadata = default) => ConnectAsync(options ?? RSocketOptions.Default, data: data == default ? default : new ReadOnlySequence <byte>(data), metadata: metadata == default ?
                                                                                                                          default : new ReadOnlySequence <byte>(metadata));
Пример #5
0
 public RSocketClient(IRSocketTransport transport, RSocketOptions options = default) : base(transport, options)
 {
 }
Пример #6
0
 public RSocketServer(IRSocketTransport transport, RSocketOptions options = default) : base(transport, options)
 {
 }
Пример #7
0
 public Task ConnectAsync(RSocketOptions options = default, byte[] data = default, byte[] metadata = default, byte[] resumeToken = default) => ConnectAsync(options ?? this.Options, data: data == default ? default : new ReadOnlySequence <byte>(data), metadata: metadata == default ?
                                                                                                                                                        default : new ReadOnlySequence <byte>(metadata), resumeToken: resumeToken);
Пример #8
0
 public RSocketClient(IRSocketTransport transport, RSocketOptions options = default) : base(transport, options)
 {
     this.Options = options ?? RSocketOptions.Default;
 }