Netty Heart Rate Mechanism and Disconnected Reconnection

1. Heart beat detection Heart beat detection is a mechanism that ensures the validity of a TCP long connection by sending packets to each other at regular intervals. Why use heartbeat detection? Fake death: If the underlying TCP connection (socket connection) is disconnected but the socket is not closed properly by the server, the server thi ...

Posted by jiehuang001 on Thu, 22 Sep 2022 21:18:51 +0300

Development of private stack protocol for high performance Netty

preface This article continues with the development knowledge of Netty's private stack protocol. The order of this article is: What is a private stack protocol? What should a private stack do? General communication model of private stack Data transfer format of private stack What is a private protocol stack? In terms of communication pr ...

Posted by chwebdesigns on Wed, 18 May 2022 05:57:51 +0300

Detailed explanation of Netty's Socket programming - building server and client and data transmission

Scenes Netty builds the HelloWorld server in IDEA and introduces the Netty execution process and important components: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/108592418 The HelloWorld for building Netty has been implemented above. The following describes how to use Netty for Socket programming, and build a server to communicat ...

Posted by cashflowtips on Tue, 17 May 2022 14:15:06 +0300

Integrating Protobuf in Netty to realize Java object data transfer

Scenes Detailed explanation of Netty's Socket programming - building server and client and data transmission: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/108615023 Introduction to ProtoBuf and serialization and deserialization of objects using protobuf in Java: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/108667427 On ...

Posted by ericm on Mon, 16 May 2022 01:22:59 +0300

spring netty websocket server development

Scenes Demand: Since the company is doing online education, the customer's customized needs require that the same account can only watch one video at the same time. (BS) Analysis: I just started thinking about listening to the browser's close() event, opening the video and storing a status in redis, and closing the browser to modify the statu ...

Posted by wmvdwerf on Sun, 15 May 2022 06:43:05 +0300

In depth understanding of NioEventLoop startup process

The startup time of NioEventLoop is after the initialization of ServerSocketChannel in NioServerSocketChannel on the server is completed and registered in NioEventLoop. The next step is to bind the port. However, before binding the port, the startup of NioEventLoop needs to be completed, because there is still only one MainThread until this sta ...

Posted by cty on Tue, 10 May 2022 02:55:43 +0300

NIO network programming - group chat system implementation

Before using NIO, let's take a look at the implementation of traditional BIO blocking IO. How Java BIO works Java BIO is traditional Java I/O programming, and its related classes and interfaces are in java.io. BIO (Blocking I/O): synchronous blocking, the server implementation mode is one connection and one thread, that is, when the client h ...

Posted by NewPHP_Coder on Sun, 01 May 2022 00:13:02 +0300

Monthly dry goods: websocket policy message routing based on netty

This article mainly writes personal examples, design and implementation ideas. If you feel that some knowledge is not detailed enough, it is recommended to search by yourself. You can also refer to your previous experience Knowledge sorting of Reactor thread model of Web Architecture article. preface It's time for another month. I originall ...

Posted by gibbo101 on Thu, 28 Apr 2022 17:53:49 +0300

Introduction to encoding and decoding

Basic introduction of encoding and decoding When writing network applications, because the data transmitted in the network is binary bytecode data, it needs to be encoded when sending data and decoded when receiving data Codec has two components: decoder and encoder. Encoder is responsible for converting business data into bytecode data, and d ...

Posted by gabo on Sun, 24 Apr 2022 14:57:06 +0300

Java Foundation Series: Socket programming

Earthly Wanderer: a procedural ape focusing on technical research Speaking of the previous words The theoretical basis without actual combat cases is playing hooligans, so today we mainly want to deepen our understanding of the past through the cases here In this section, we will implement a point-to-point chat applet step by step So ...

Posted by wyvern on Thu, 14 Apr 2022 21:35:57 +0300