DuplexConnection that connects via TCP.
| Modifier and Type | Field and Description |
|---|---|
| private final Connection | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | TcpDuplexConnection(Connection
the connection)Connection for managing the serverCreates a new instance |
| public | TcpDuplexConnection(String side, Connection
the connection)Connection for managing the serverCreates a new instance |
| Modifier and Type | Method and Description |
|---|---|
| public ByteBufAllocator | |
| protected void | |
| public Mono | onClose()
Overrides io. Implements io. Mono that terminates when the instance is terminated by any reason.
|
| public Flux | receive()
Implements io. Frames received on this connection.
|
| public SocketAddress | remoteAddress()
Implements io. |
| public void | sendErrorAndClose(RSocketErrorException
to encode in the error frame e)Implements io. |
| public void | sendFrame(int
to which the given frame relates streamId, ByteBuf with the encoded content frame)Overrides io. Implements io. |
| public String |
| connection | back to summary |
|---|---|
| private final Connection connection | |
| side | back to summary |
|---|---|
| private final String side | |
| TcpDuplexConnection | back to summary |
|---|---|
| public TcpDuplexConnection(Connection connection) Creates a new instance
| |
| TcpDuplexConnection | back to summary |
|---|---|
| public TcpDuplexConnection(String side, Connection connection) Creates a new instance
| |
| alloc | back to summary |
|---|---|
| public ByteBufAllocator alloc() Implements io. Doc from io. Returns the assigned
| |
| doOnClose | back to summary |
|---|---|
| protected void doOnClose() Implements abstract io.
| |
| onClose | back to summary |
|---|---|
| public Mono Overrides io. Implements io. Doc from io. Returns a | |
| receive | back to summary |
|---|---|
| public Flux Implements io. Doc from io. Returns a stream of all Completion Returned Error Returned Multiple Subscriptions Returned | |
| remoteAddress | back to summary |
|---|---|
| public SocketAddress remoteAddress() Implements io. Doc from io. Return the remote address that this connection is connected to. The returned
| |
| sendErrorAndClose | back to summary |
|---|---|
| public void sendErrorAndClose(RSocketErrorException e) Implements io. Doc from io. Send an error frame and after it is successfully sent, close the connection.
| |
| sendFrame | back to summary |
|---|---|
| public void sendFrame(int streamId, ByteBuf frame) Overrides io. Implements io. Doc from io. Delivers the given frame to the underlying transport connection. This method is non-blocking and can be safely executed from multiple threads. This method does not provide any flow-control mechanism. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |