Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Inter-process communication method, electronic device and readable storage medium

A technology for inter-process communication and storage space, which is applied in the field of electronic equipment, readable storage media, and inter-process communication, and can solve problems such as easy connection failure of named pipe servers

Active Publication Date: 2018-11-23
WUHAN DOUYU NETWORK TECH CO LTD
View PDF4 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The embodiment of the present invention provides an inter-process communication method, an electronic device, and a readable storage medium, which are used to solve the problem that a large number of clients are prone to connection failure when connecting to a named pipe server with high concurrent connections at the same time, thereby improving the performance of the named pipe server

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
  • Inter-process communication method, electronic device and readable storage medium
  • Inter-process communication method, electronic device and readable storage medium
  • Inter-process communication method, electronic device and readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0079] Please refer to figure 1 , the first embodiment of the present invention provides an inter-process communication method, which is applied to a server, and the inter-process communication method includes the following steps:

[0080] S101: Create a service thread, the service thread is used to process the asynchronous task for the client, the asynchronous task includes processing the connection request of the client, receiving the data request sent by the client, and sending the data request to the client;

[0081] S102: Call the accept function, call the CreateNamedPipe function through the accept function to create an asynchronous named pipe handle and create an overlapping IO through the accept function, pass the named pipe handle into the Pointer field of the overlapping IO, and call the ConnectNamedPipe function , asynchronously waiting for the asynchronous task from the client, calling the GetLastError function to obtain the current connection status of the named p...

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 present invention provides an inter-process communication method, an electronic device and a readable storage medium, the method comprising: creating a service thread; creating an asynchronous named pipe handle and overlapping IO; passing the named pipe handle to the Pointer field of the overlapping IO; calling ConnectNamedPipe function; asynchronously waiting for an asynchronous task from a client; calling GetLastError function; and getting current connection state of the named pipe handle; when the current connection state is ERROR_IO_PENDING, storing the overlapping IO in a storage space; when the current connection state is ERROR_PIPE_CONNECTED, determining a first client connected with the named pipe handle, and processing the data task corresponding to the first client; after thetask is processed, if the current connection state of the named pipe handle is ERROR_IO_PENDING, storing the overlapping IO in the storage space; checking overlapping IO in the storage space throughservice thread loop, if it is checked that the current overlapping IO processing is completed, continue to process the overlapping IO of the next storage space.

Description

technical field [0001] The invention relates to the field of electronic technology, in particular to an inter-process communication method, electronic equipment and a readable storage medium. Background technique [0002] Under the Windows system, the named pipe NamedPipe can be used for inter-process communication. When using named pipes to implement inter-process data transmission, both asynchronous and synchronous methods can be used. If a synchronous method is used, when sending or receiving a large amount of data, it is very likely to cause blocking or freezing of the upper-layer application. When using asynchronous transmission, since the upper layer application will not return until all the data is processed, using named pipes for asynchronous transmission will have a better effect. When using named pipes in the prior art, most of them adopt a one-to-one manner, that is, communicate between a single process and a single process, and do not adopt a manner of communic...

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/544
Inventor 杨亮陈少杰张文明
Owner WUHAN DOUYU NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products