public interface DuplexConnection extends Availability, Closeable
Disposable.Composite, Disposable.Swap
Modifier and Type | Method and Description |
---|---|
default double |
availability() |
Flux<Frame> |
receive()
Returns a stream of all
Frame s received on this connection. |
Mono<Void> |
send(org.reactivestreams.Publisher<Frame> frames)
Sends the source of
Frame s on this connection and returns the Publisher
representing the result of this send. |
default Mono<Void> |
sendOne(Frame frame)
Sends a single
Frame on this connection and returns the Publisher representing
the result of this send. |
dispose, isDisposed
Mono<Void> send(org.reactivestreams.Publisher<Frame> frames)
Frame
s on this connection and returns the Publisher
representing the result of this send.
Publisher
mustframes
- Stream of Frame
s 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 null
default Mono<Void> sendOne(Frame 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<Frame> receive()
Frame
s 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.Frame
s received.default double availability()
availability
in interface Availability