File tree Expand file tree Collapse file tree 3 files changed +33
-3
lines changed Expand file tree Collapse file tree 3 files changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,36 @@ public class ExampleClient {
8080}
8181```
8282
83+ ## Zero Copy
84+ By default to make RSocket easier to use it copies the incoming Payload. Copying the payload comes at cost to performance
85+ and latency. If you want to use zero copy you must disable this. To disable copying you must include a ` frameDecoder `
86+ argument in your ` RSocketFactory ` . This will let you manage the Payload without copying the data from the underlying
87+ transport. You must free the Payload when you are done with them
88+ or you will get a memory leak. Used correctly this will increase latency and performance.
89+
90+ ### Example Server setup
91+ ``` java
92+ RSocketFactory . receive()
93+ // Enable Zero Copy
94+ .frameDecoder(Frame :: retain)
95+ .acceptor(new PingHandler ())
96+ .transport(TcpServerTransport . create(7878 ))
97+ .start()
98+ .block()
99+ .onClose()
100+ .block();
101+ ```
102+
103+ ### Example Client setup
104+ ``` java
105+ Mono<RSocket > client =
106+ RSocketFactory . connect()
107+ // Enable Zero Copy
108+ .frameDecoder(Frame :: retain)
109+ .transport(TcpClientTransport . create(7878 ))
110+ .start();
111+ ```
112+
83113## Bugs and Feedback
84114
85115For bugs, questions and discussions please use the [ Github Issues] ( https://github.com/RSocket/reactivesocket-java/issues ) .
Original file line number Diff line number Diff line change @@ -28,10 +28,10 @@ plugins {
2828subprojects {
2929 apply plugin : ' io.spring.dependency-management'
3030
31- ext[' reactor-bom.version' ] = ' Californium-SR1 '
31+ ext[' reactor-bom.version' ] = ' Californium-SR3 '
3232 ext[' logback.version' ] = ' 1.2.3'
3333 ext[' findbugs.version' ] = ' 3.0.2'
34- ext[' netty.version' ] = ' 4.1.29 .Final'
34+ ext[' netty.version' ] = ' 4.1.31 .Final'
3535 ext[' netty-boringssl.version' ] = ' 2.0.18.Final'
3636 ext[' hdrhistogram.version' ] = ' 2.1.10'
3737 ext[' mockito.version' ] = ' 2.23.0'
Original file line number Diff line number Diff line change 1212# limitations under the License.
1313#
1414
15- version =0.11.15
15+ version =0.11.16-SNAPSHOT
You can’t perform that action at this time.
0 commit comments