public interface DuplexConnection extends Availability, Closeable
Disposable.Composite, Disposable.Swap| Modifier and Type | Method and Description |
|---|---|
default double |
availability() |
Flux<ByteBuf> |
receive()
Returns a stream of all
Frames received on this connection. |
Mono<Void> |
send(org.reactivestreams.Publisher<ByteBuf> frames)
Sends the source of Frames on this connection and returns the
Publisher representing
the result of this send. |
default Mono<Void> |
sendOne(ByteBuf frame)
Sends a single
Frame on this connection and returns the Publisher representing
the result of this send. |
dispose, isDisposedMono<Void> send(org.reactivestreams.Publisher<ByteBuf> frames)
Publisher representing
the result of this send.
Publisher mustframes - Stream of Frames to send on the connection.Publisher that completes when all the frames are written on the connection
successfully and errors when it fails.NullPointerException - if frames is nulldefault Mono<Void> sendOne(ByteBuf frame)
Frame on this connection and returns the Publisher representing
the result of this send.frame - Frame to send.Publisher that completes when the frame is written on the connection
successfully and errors when it fails.Flux<ByteBuf> receive()
Frames received on this connection.
Publisher MUST never emit a completion event (Subscriber.onComplete().
Publisher can error with various transport errors. If the underlying physical
connection is closed by the peer, then the returned stream from here MUST emit an
ClosedChannelException.
Publisher is not required to support multiple concurrent subscriptions.
RSocket will never have multiple subscriptions to this source. Implementations MUST
emit an IllegalStateException for subsequent concurrent subscriptions, if they do not
support multiple concurrent subscriptions.Frames received.default double availability()
availability in interface Availability