Business, most of the frame is the client report, servers don't have to reply, the server sends to the equipment frame also need not reply
Use wireshark caught on, the server sends to the client, a large number of black scarlet letter bad package
My ip192.168.1.168 equipment ip192.168.1.150
Caught found every client send up a frame, although need not reply on my business, but TCP or an ACK packet is sent back to normal equipment, and followed by a exactly the same as the bad package, display TCP dup ACK
I sent to the client's frame, and also is a normal bag behind with a bad bag, bad package display TCP retransmission
And the client is to receive frames
Why do I sent to the client is a normal bag keep up with a bad bag? And there are a lot of is not my business packages, these are what? After the server receives the frame must have to reply to a frame?
Try {
ServerBootstrap bootstrap=new ServerBootstrap ()
Group (boss, worker)
Channel (NioServerSocketChannel. Class)
. LocalAddress (inetSocketAddress)
ChildOption (ChannelOption TCP_NODELAY, true)
ChildOption (ChannelOption SO_KEEPALIVE, true)
ChildHandler (new HvacChannelInitializer (context));
ChannelFuture future=the bootstrap. The bind (). The sync ();
If (future) isSuccess ()) {
The info (" [TCP Server] Server started @ {} : {} ", IP, tcpPort);
}
Future. Channel (.) closeFuture (). The sync ();
{} catch InterruptedException (e)
The log. The error (" [TCP Server] Server started failed ", e);
} the finally {
Boss. ShutdownGracefully ();
Worker. ShutdownGracefully ();
PreDestroy ();
}
CodePudding user response:
This error may be the underlying transportCheck the network equipment and cables
CodePudding user response: