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 {
80
80
}
81
81
```
82
82
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
+
83
113
## Bugs and Feedback
84
114
85
115
For 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 {
28
28
subprojects {
29
29
apply plugin : ' io.spring.dependency-management'
30
30
31
- ext[' reactor-bom.version' ] = ' Californium-SR1 '
31
+ ext[' reactor-bom.version' ] = ' Californium-SR3 '
32
32
ext[' logback.version' ] = ' 1.2.3'
33
33
ext[' findbugs.version' ] = ' 3.0.2'
34
- ext[' netty.version' ] = ' 4.1.29 .Final'
34
+ ext[' netty.version' ] = ' 4.1.31 .Final'
35
35
ext[' netty-boringssl.version' ] = ' 2.0.18.Final'
36
36
ext[' hdrhistogram.version' ] = ' 2.1.10'
37
37
ext[' mockito.version' ] = ' 2.23.0'
Original file line number Diff line number Diff line change 12
12
# limitations under the License.
13
13
#
14
14
15
- version =0.11.15
15
+ version =0.11.16-SNAPSHOT
You can’t perform that action at this time.
0 commit comments