Skip to content

Conversation

NiteshKant
Copy link
Contributor

Problem

Current TCP transport implementation lacks a few critical features around insights and network flow control.

Solution

Since RxNetty already has these features, it makes sense to use it.

This is a backward incompatible change as it removes some public classes

EchoClient in examples module contains the usage example.

Current TCP transport implementation lacks a few critical features around insights and network flow control.
Since RxNetty already has these features, it makes sense to use it.
…cket-java into rxnetty

# Conflicts:
#	reactivesocket-examples/src/main/java/io/reactivesocket/examples/EchoClient.java
#	reactivesocket-transport-tcp/src/main/java/io/reactivesocket/transport/tcp/client/ClientTcpDuplexConnection.java
#	reactivesocket-transport-tcp/src/main/java/io/reactivesocket/transport/tcp/client/TcpReactiveSocketConnector.java
…cket-java into rxnetty

# Conflicts:
#	reactivesocket-examples/src/main/java/io/reactivesocket/examples/EchoClient.java
#	reactivesocket-transport-tcp/src/main/java/io/reactivesocket/transport/tcp/client/ClientTcpDuplexConnection.java
#	reactivesocket-transport-tcp/src/main/java/io/reactivesocket/transport/tcp/client/TcpReactiveSocketConnector.java

System.out.println(response);
RxReactiveStreams.toObservable(client.requestResponse(request))
.map(payload -> {
Copy link
Member

@yschimke yschimke Jun 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example would be a lot nicer with a utility function

.map(PayloadUtil::dataAsString)

Also 2000 era nit that new String() isn't safe without specifying encoding

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.
My just another rant about ByteBuffer API, as compared to netty's ByteBuf API which enables this:

.map(bb -> bb.toString(Charset.defaultCharset())))

😞

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Also updated to rxnetty-0.5.2-rc.3
@NiteshKant
Copy link
Contributor Author

@yschimke @stevegury addressed all comments and updated to latest RxNetty

ByteBuffer data = payload.getData();
byte[] dst = new byte[data.remaining()];
data.get(dst);
return new String(dst);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll add a charset in another commit ;-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Steve - I'm looking out for the EBCDIC users of the world

@stevegury stevegury merged commit 023bb54 into rsocket:master Jun 23, 2016
@NiteshKant NiteshKant deleted the rxnetty branch July 8, 2016 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants