diff --git a/rsocket-core/src/main/java/io/rsocket/core/RSocketConnector.java b/rsocket-core/src/main/java/io/rsocket/core/RSocketConnector.java index 342fd9480..1c4e66477 100644 --- a/rsocket-core/src/main/java/io/rsocket/core/RSocketConnector.java +++ b/rsocket-core/src/main/java/io/rsocket/core/RSocketConnector.java @@ -61,18 +61,20 @@ *
{@code * import io.rsocket.transport.netty.client.TcpClientTransport; * - * RSocketClient client = - * RSocketConnector.createRSocketClient(TcpClientTransport.create("localhost", 7000)); + * Mono* *source = + * RSocketConnector.connectWith(TcpClientTransport.create("localhost", 7000)); + * RSocketClient client = RSocketClient.from(source); * }
To customize connection settings before connecting: * *
{@code - * RSocketClient client = + * Mono*/ public class RSocketConnector { @@ -112,7 +114,7 @@ public static RSocketConnector create() { * Static factory method to connect with default settings, effectively a shortcut for: * *source = * RSocketConnector.create() * .metadataMimeType("message/x.rsocket.composite-metadata.v0") * .dataMimeType("application/cbor") - * .toRSocketClient(TcpClientTransport.create("localhost", 7000)); + * .connect(TcpClientTransport.create("localhost", 7000)); + * RSocketClient client = RSocketClient.from(source); * }
- * RSocketConnector.create().connectWith(transport); + * RSocketConnector.create().connect(transport); ** * @param transport the transport of choice to connect with