@@ -66,7 +66,7 @@ public RSocket(IRSocketTransport transport, RSocketOptions options = default)
66
66
67
67
//TODO SPEC: A requester MUST not send PAYLOAD frames after the REQUEST_CHANNEL frame until the responder sends a REQUEST_N frame granting credits for number of PAYLOADs able to be sent.
68
68
69
- public IAsyncEnumerable < T > RequestChannel < TSource , T > ( IAsyncEnumerable < TSource > source , Func < TSource , ReadOnlySequence < byte > > sourcemapper ,
69
+ public virtual IAsyncEnumerable < T > RequestChannel < TSource , T > ( IAsyncEnumerable < TSource > source , Func < TSource , ReadOnlySequence < byte > > sourcemapper ,
70
70
Func < ( ReadOnlySequence < byte > data , ReadOnlySequence < byte > metadata ) , T > resultmapper ,
71
71
ReadOnlySequence < byte > data = default , ReadOnlySequence < byte > metadata = default )
72
72
=> new Receiver < TSource , T > ( stream => RequestChannel ( stream , data , metadata ) , source , _ => ( default , sourcemapper ( _ ) ) , value => resultmapper ( value ) ) ;
@@ -94,7 +94,7 @@ public Task Send((ReadOnlySequence<byte> metadata, ReadOnlySequence<byte> data)
94
94
}
95
95
96
96
97
- public IAsyncEnumerable < T > RequestStream < T > ( Func < ( ReadOnlySequence < byte > data , ReadOnlySequence < byte > metadata ) , T > resultmapper ,
97
+ public virtual IAsyncEnumerable < T > RequestStream < T > ( Func < ( ReadOnlySequence < byte > data , ReadOnlySequence < byte > metadata ) , T > resultmapper ,
98
98
ReadOnlySequence < byte > data = default , ReadOnlySequence < byte > metadata = default )
99
99
=> new Receiver < T > ( stream => RequestStream ( stream , data , metadata ) , value => resultmapper ( value ) ) ;
100
100
@@ -105,7 +105,7 @@ public Task RequestStream(IRSocketStream stream, ReadOnlySequence<byte> data, Re
105
105
return new RSocketProtocol . RequestStream ( id , data , metadata , initialRequest : Options . GetInitialRequestSize ( initial ) ) . WriteFlush ( Transport . Output , data , metadata ) ;
106
106
}
107
107
108
- public Task < T > RequestResponse < T > ( Func < ( ReadOnlySequence < byte > data , ReadOnlySequence < byte > metadata ) , T > resultmapper ,
108
+ public virtual Task < T > RequestResponse < T > ( Func < ( ReadOnlySequence < byte > data , ReadOnlySequence < byte > metadata ) , T > resultmapper ,
109
109
ReadOnlySequence < byte > data = default , ReadOnlySequence < byte > metadata = default )
110
110
=> new Receiver < T > ( stream => RequestResponse ( stream , data , metadata ) , resultmapper ) . ExecuteAsync ( ) ;
111
111
@@ -116,7 +116,7 @@ public Task RequestResponse(IRSocketStream stream, ReadOnlySequence<byte> data,
116
116
}
117
117
118
118
119
- public Task RequestFireAndForget (
119
+ public virtual Task RequestFireAndForget (
120
120
ReadOnlySequence < byte > data = default , ReadOnlySequence < byte > metadata = default )
121
121
=> new Receiver < bool > ( stream => RequestFireAndForget ( stream , data , metadata ) , _ => true ) . ExecuteAsync ( result : true ) ;
122
122
0 commit comments