Server communication method based on NIO asynchronous thread model

An asynchronous thread and communication method technology, applied in the server field, can solve problems such as not being able to meet the increasing number of devices, and achieve the effects of improving real-time performance and stability, strong real-time performance, and clear logic

Pending Publication Date: 2021-11-09
XUJI GRP +1
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

With the process of modernization, the explosive growth of data, the use of the origina

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Server communication method based on NIO asynchronous thread model
  • Server communication method based on NIO asynchronous thread model
  • Server communication method based on NIO asynchronous thread model

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0046] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in combination with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are exemplary only, and are not intended to limit the scope of the present invention. Also, in the following description, descriptions of well-known structures and techniques are omitted to avoid unnecessarily obscuring the concept of the present invention.

[0047] NIO technology is mainly composed of three core parts, including: Buffer, Channel, Selector. Among them, Channel is a channel that can read and write data in both directions. It includes file operation IO and network IO, namely FileChannel (file IO), DatagramChannel (udp datagram), SocketChannel (tcp client) and ServerSocketChannel (tcp server). Buffer is an intermediate buffer, data can be read from Channel to Bu...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a server communication method based on an NIO asynchronous thread model. According to the method, the NIO asynchronous thread model is adopted, and management of a large number of connections can be completed through one thread, so that the communication performance of the server is improved, the communication process between the server and the client is more efficient and flexible, and fewer resources are occupied. The specific content of the communication method comprises the steps of performing initialization definition setting in a framework and establishing a connection request; starting a socket service, starting monitoring, processing various events after the system receives a specified event message notification, and initializing to clear the processed events. The communication method is clear in logic and easy to implement; the occupied resources are few, efficient and flexible; and the method is high in real-time performance, stable and reliable.

Description

technical field [0001] The invention relates to the technical field of servers, in particular to a server communication method based on the NIO asynchronous thread model. Background technique [0002] With the extensive application and rapid development of IOT technology, a large number of network applications deployed on terminal devices are connected to the Internet through TCP / IP (Transmission Control Protocol / Internet Interconnection Protocol). In modern times, there are millions of IoT devices connected in a digital city, and they communicate all the time, resulting in a huge amount of terminal data. Among them, the Socket communication method is a commonly used mechanism, which has very strong applicability, not only for network communication, but also for hardware control, inter-process communication and other occasions. Socket is a socket used to describe IP addresses and ports, and is a handle for network communication. Socket communication applications usually run...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F9/54G06F9/50G16Y10/35G16Y30/00G16Y40/10
CPCG06F9/544G06F9/542G06F9/5061G16Y10/35G16Y30/00G16Y40/10G06F2209/5011G06F2209/5018
Inventor 熊章学李如意方旭刘利兵舒志猛胡东方王文浩韩林峰
Owner XUJI GRP
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products