Network communication method and system based on C ++ 11

A technology of network communication and local communication, which is applied in the field of network communication methods and systems based on C++11, can solve the problems of not supporting object-oriented, excessive magnitude, etc., achieve simple interface and reduce the workload of secondary development Effect

Inactive Publication Date: 2020-06-09
中孚安全技术有限公司 +3
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The purpose of the present invention is to provide a network communication method and system based on C++11, aiming to solve the problem that the inter-process communication in the prior art does not support object-oriented and the magnitude is too heavy, realize lightweight, do not occupy a large amount of resources, and reduce the User's secondary development workload

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
  • Network communication method and system based on C ++ 11
  • Network communication method and system based on C ++ 11
  • Network communication method and system based on C ++ 11

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] In order to clearly illustrate the technical features of the present solution, the present invention will be described in detail below through specific implementation methods and in conjunction with the accompanying drawings. The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. To simplify the disclosure of the present invention, components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and / or letters in different instances. This repetition is for the purpose of simplicity and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed. It should be noted that components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and processes are omitted herein to avoid unnecessarily lim...

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 provides a network communication method and system based on C ++ 11. According to the method, inter-process communication is designed by utilizing a C ++ 11 new characteristic architecture, a main thread for loop execution is set in a CPU, an add_listen_port and an add_listen_unix function interface are called to monitor an event, a processing function of the event is added in advance, and after the event occurs, and the processing function registered by the user is added into a thread pool by the system, thereby realizing asynchronous processing of the event service. A unified interface is provided for the outside, a user only needs to register his / her own work function, and the secondary development workload of the user is greatly reduced. The code is lightweight, and doesnot occupy too large resources of the system; the interface is simple, and a user only needs to concern the interface and register the concerned function; and meanwhile, local communication and network communication are supported.

Description

technical field [0001] The invention relates to the technical field of network communication, in particular to a C++11-based network communication method and system. Background technique [0002] As network communication becomes more and more important in software, it is more and more important to design and develop a simple inter-process communication framework technology. For inter-process communication, Unix Domain Socket and Inet socket are common on the domestic Linux operating system, and they transmit data in the form of streams. Now the main method is packaged on top of many open source network communication projects. The disadvantage is that many communication libraries are too heavy and do not support object-oriented methods. Contents of the invention [0003] The purpose of the present invention is to provide a network communication method and system based on C++11, aiming to solve the problem that the inter-process communication in the prior art does not suppo...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/54
CPCG06F9/54
Inventor 苗功勋李原科王金国吴明孙强
Owner 中孚安全技术有限公司
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