Questions tagged [netty4]
44 questions
0
votes
0 answers
how to use DynamicAddressConnectHandler in netty?
I would like to build a TCP server based on Netty and configure the host and port dynamically. How do I achieve this? It seems like an abstract class, I tried to extend it. But I have no no idea how to implement a dynamic address
below is my code…

Peng
- 653
- 8
0
votes
0 answers
Can I change Netty pipeline by events?
My app should do the next:
Send a POST request to server to get the token.
Connect to the websocket using this token in the headers while handshake.
Short question: To activate WebSocketClientProtocolHandler I have to fire event…

Анатолий Сивенко
- 127
- 1
- 10
0
votes
1 answer
Netty 4 - Copy specific nr of bytes from ByteBuf into Native ByteBuffer
I've been implementing Netty 4 on my app and I've ran into a limitation which I would like to optimize.
I'm using NioSocketChannel where when I receive data, the final object it needs to end up into is a Direct ByteBuffer Native,created as…

Ralms
- 463
- 5
- 13
0
votes
1 answer
Replacement for netty SimpleChannelUpstreamHandler from netty 3 to 4.1
We are upgrading from netty 3 to 4.1 and have lot of code which uses SimpleChannelUpstreamHandler. What is the replacement for this class and its method messageReceived? below is code snippet.
public class IcapClientHandler extends…
0
votes
0 answers
Netty, how to safely manipulate data from different ChannelHandlers?
I have a NioEventLoopGroup and a HashMap. Can I safely read from one ChannelHandler this collection and simultaneously change it from another?

Mike Waters
- 109
- 2
0
votes
2 answers
How to release Pooled direct ByteBuf in netty when written after by ChannelHandlerContext?
In my c/s project, c/s need to exchange fixed-size message with netty.
I use pooled direct buffer to buffer message.
Code just like below:
public void channelRead(ChannelHandlerContext ctx, Object msg) {
ByteBuf in = (ByteBuf) msg;
try {
…

shanfeng
- 503
- 2
- 14
0
votes
1 answer
How can I measure the time netty 4.1 needs to send some data?
I have a workload where I have a server and a client, both under my control. They communicate via a TCP connection using Netty 4.1. The state diagram looks like this:
Server Client
params = f();
-->
…

le_me
- 3,089
- 3
- 26
- 28
0
votes
0 answers
No buffer space available (maximum connections reached?) issue when triggering external Rest API using Camel and netty-http
I am using Camel and netty-http to consume the external rest api's of azure.
I have configured camel-cron to run my api 3 hours once, which will trigger azure api to pull all the builds and then for each of the build it will trigger subsequent azure…

Vijaya
- 157
- 1
- 16
0
votes
1 answer
How to parallelize processing of partially ordered messages?
My Netty based app
ingests hundreds of thousands of messages per second from a single TCP connection
processes those messages in a couple of inbound handlers
sends processing results somewhere downstream
Currently, all this is running on thread,…

Evgeniy Berezovsky
- 18,571
- 13
- 82
- 156
0
votes
0 answers
Apache Camel TCP client communicate to a server
I am new to apache camel. What I am trying to do is I have exposed and Rest api to get data.
From that I need to communicate to an existing TCP server(Simple java server application) to retrieve data and send back to a client. What I have picked is…

Pubudu Ranathunga
- 102
- 10
0
votes
0 answers
Deadlock while closing Netty channel
I'm working on an application that uses Netty to send/receive RTP traffic. During a load test, we noticed that our single work thread ran into a deadlock while attempting to wait for Netty to close a channel.
Context:
There is a shared…

schneida
- 729
- 3
- 11
- 37
0
votes
1 answer
Constructing HTTP Chunks from ByteBuf in Netty 4
I have a Netty 3 codebase with an HTTP Message decoder which extends ReplayingDecoder, and I need to migrate code which analyzes the chunks of the message, which means I need to get the chunks.
protected Object decode(ChannelHandlerContext ctx,…

patrickjp93
- 399
- 4
- 20
0
votes
1 answer
Adding latency in Netty Server
What is the best way to add latency to a Netty Server for testing? If a simple Thread.sleep(n) is added before the writeAndFlush(), the handler doesn’t become free to process the next request until the writeAndFlush() is executed, which is necessary…

Alarka Sanyal
- 11
- 2
0
votes
1 answer
Determine which TLS version was negotiated by client to a Netty server, with SniHandler
I am current working on a Netty server with SniHandler in the pipeline. I would like to log the negotiated TLS version in session, but I cannot find this information in SniHandler or SniHandler.SslContext.
I was trying to access the SslHandler from…

Harry
- 23
- 2
0
votes
2 answers
Netty multiple protocols on the same port?
I would need to implement a HTTP server where a certain URI allows upgrading to a WebSocket connection. The standard WebSocket handler class is…

eof
- 413
- 4
- 14