private int StreamDispatch(IRSocketStream transform) => StreamDispatch(NewStreamId(), transform);
public int DispatchStream(int streamId, IRSocketStream observer, IRequestCredit requestCredit) { dispatcher[streamId] = new RSocketStream(observer, requestCredit); return(streamId); }
private int StreamDispatch(int id, IRSocketStream transform) { Dispatcher[id] = transform; return(id); }
public Task RequestResponse <TData, TMetadata>(IRSocketStream stream, TData data, TMetadata metadata = default) => RequestResponse(stream, RequestDataSerializer.Serialize(data), RequestMetadataSerializer.Serialize(metadata));
public int DispatchStream(IRSocketStream stream, IRequestCredit requestCredit) => DispatchStream(NewStreamId(), stream, requestCredit);
public Task RequestResponse <TData>(IRSocketStream stream, TData data, ReadOnlySpan <byte> metadata = default) => RequestResponse(stream, RequestDataSerializer.Serialize(data), metadata);
public Task RequestResponse <TMetadata>(IRSocketStream stream, ReadOnlySpan <byte> data, TMetadata metadata = default) => RequestResponse(stream, data, RequestMetadataSerializer.Serialize(metadata));
public Task RequestFireAndForget <TMetadata>(IRSocketStream stream, ReadOnlySpan <byte> data, TMetadata metadata = default) => RequestFireAndForget(stream, data, RequestMetadataSerializer.Serialize(metadata));
public Task RequestFireAndForget <TData, TMetadata>(IRSocketStream stream, TData data, TMetadata metadata = default) => RequestFireAndForget(stream, RequestDataSerializer.Serialize(data), RequestMetadataSerializer.Serialize(metadata));
public Task RequestFireAndForget <TData>(IRSocketStream stream, TData data, ReadOnlySpan <byte> metadata = default) => RequestFireAndForget(stream, RequestDataSerializer.Serialize(data), metadata);
public Task RequestStream <TData, TMetadata>(IRSocketStream stream, TData data, TMetadata metadata = default, int initial = INITIALDEFAULT) => RequestStream(stream, RequestDataSerializer.Serialize(data), RequestMetadataSerializer.Serialize(metadata), initial);
public Task RequestStream <TMetadata>(IRSocketStream stream, ReadOnlySpan <byte> data, TMetadata metadata = default, int initial = INITIALDEFAULT) => RequestStream(stream, data, RequestMetadataSerializer.Serialize(metadata), initial);
//TODO Ugh, these are all garbage. Remove in favor of the transformation ones. public Task <IRSocketChannel> RequestChannel <TData>(IRSocketStream stream, TData data, ReadOnlySpan <byte> metadata = default, int initial = INITIALDEFAULT) => RequestChannel(stream, RequestDataSerializer.Serialize(data), metadata, initial);
public RSocketStream(IRSocketStream observer, IRequestCredit credit) { this.observer = observer; Credit = credit; }