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
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
Netty builds the HelloWorld server in IDEA and introduces the Netty execution process and important components:
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
Detailed explanation of Netty's Socket programming - building server and client and data transmission:
Introduction to ProtoBuf and serialization and deserialization of objects using protobuf in Java:
Posted by ericm on Mon, 16 May 2022 01:22:59 +0300
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
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 ...
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
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.
It's time for another month. I originall ...
Posted by gibbo101 on Thu, 28 Apr 2022 17:53:49 +0300
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 ...
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
Posted by wyvern on Thu, 14 Apr 2022 21:35:57 +0300