Comments (4)
I know that BackpressureManagingHandler may help controll the flow in write aspect,but how it works in read aspect?
from rxnetty.
and I want to know How to use this feature when I want to add a ChannleHandler to the pipeline.
this way?
or this way?
from rxnetty.
@jamesgorman2 would you please do me a favor?
from rxnetty.
Hi cynthju, answers below
BackpressureManagingHandler
I didn't write this, so I'm going on my reading of it and my best understanding of TCP.
For reading BackpressureManagingHandler
delegates its behaviour to AbstractConnectionToChannelBridge.ReadProducer
which is an RxJava producer tha handles the backpressure. It will tell BackpressureManagingHandler
if it has active read requests, which will pass that to Netty. I guess this then uses native TCP behaviour to tell the writer to stop sending once the local receive buffer is full.
ChannelHandler
In this instance the behaviour is identical. The first will always add a new THandler
to all connections. If the second can be set up to do it only to some connections, eg:
TcpServer<ByteBuf, ByteBuf> s = TcpServer.newServer()
.start(
newConnection ->
Math.random() < 0.5 ?
newConnection.addChannelHandlerLast("TestHandler",new THandler()).ignoreInput() :
newConnection.ignoreInput()
);
from rxnetty.
Related Issues (20)
- Adding PipelineConfigurator in RxNetty 0.5.x HOT 1
- My async client keeps getting “Content stream is already disposed” error HOT 2
- Any plan to build RxNetty on top of RxJava 2?
- ConnectionHandler on 0.5.x-java2 branch imports rx.Observable HOT 1
- For large POSTs RxNetty seems to need to write everything before reading anything HOT 6
- ClosedChannelException while TcpClient reads from TcpServer HOT 3
- 0.5 Intuitive bytebuf handling HOT 2
- RxNetty 0.5.2 stable? HOT 4
- Create Http Client without binding it to an endpoint HOT 3
- [0.4.20] NullPointException when closing socket HOT 2
- Writes out of order when using multiple threads
- Does RxNetty support http2 multiplexing? HOT 1
- why before response.close() must response.getChannel().deregister()? HOT 2
- Unnecessary synchronised lock
- Connection Leak 0.5.2 HOT 6
- HTTP POST example (REST) HOT 4
- [SECURITY] unsafeSecure() should not be used in samples HOT 1
- ResourceLeakDetector,LEAK: ByteBuf.release()
- HTTPS Server with RxNetty and existing certificate
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxnetty.