Hey, Usually you would use channelWritabilityChanged events to do this.
Set your WriteBufferWaterMark when bootstrap your Channel and then add a ChannelInboundHandler that implements channelWritabilityChanged(…). Depending on if Channel.isWritable() you can either stop or start reading again by either trigger Channel.config().setAutoRead(false|true). Or if you want to be even more flexible you can configure the Channel to not use auto-read at all and manage the calls to Channel.read() by yourself. Hope this helps, Norman > On 12. May 2018, at 16:10, Khayam Gondal <[email protected]> wrote: > > > <https://lh3.googleusercontent.com/-fSJk4HDjIFg/Wvb0hHjzHAI/AAAAAAAAiQU/aQLKRahdrGMNiiMyX0dm3J7UWNMLVMbdwCLcBGAs/s1600/1.jpg> > I have above setup. A 3rd party client is sending traffic over 10G link to my > netty server and I have to forward it over a 1G link using Netty client. As I > can't write very fast, I also need to adjust my read speed. Is there anyway > using Netty's API to find out how fast my channel is capable of sending so I > can adjust my read server bandwidth. > > > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Netty discussions" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/netty/b295b9e4-bd5b-4074-8f85-466573f700e5%40googlegroups.com > > <https://groups.google.com/d/msgid/netty/b295b9e4-bd5b-4074-8f85-466573f700e5%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "Netty discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/netty/312F8EEA-93EA-436A-A6B4-14BD7070BC0F%40googlemail.com. For more options, visit https://groups.google.com/d/optout.
