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

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

A technology of inter-process communication and storage space, which is applied in the fields of inter-process communication, electronic equipment and readable storage media, and can solve problems such as insufficient client permissions, abnormal communication connection between server and client, failure to connect to named pipe server, etc.

Active Publication Date: 2021-02-02
WUHAN DOUYU NETWORK TECH CO LTD
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

When the server process starts with administrator privileges and creates a named pipe using the default security method, if the client opens the named pipe created on the server side with non-administrator privileges, the client will not be able to connect because of insufficient privileges The named pipe server causes an abnormal communication connection between the server and the client

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

[0064] 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:

[0065] 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;

[0066] S102: call the accept function, create an asynchronous named pipe handle by calling the CreateNamedPipe function with preset security access attributes set by the accept function and create an overlapping IO by using the accept function, and pass the named pipe handle into the overlapping IO In the Pointer field of , call the ConnectNamedPipe function, asynchronously wait for the asynchronous task from the client, and store the overlapping IO in the storage sp...

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 an inter-process communication method, electronic equipment and a readable storage medium, which are used to provide a method for realizing asynchronous data communication between a server process and multiple client processes by using a named pipe of Windows. The method includes: creating a service thread; calling the accept function, creating an overlapped IO and calling the CreateNamedPipe function with preset security access attributes to create an asynchronous named pipe handle, passing the named pipe handle into the Pointer field of the overlapped IO, and calling the ConnectNamedPipe function , asynchronously wait for the asynchronous task from the client, store the overlapping IO in the storage space corresponding to the asynchronous task; check the overlapping IO in the first storage space, the second storage space and the third storage space through the service thread cycle, if you check The current overlapping IO processing is completed, and the overlapping IO of the next storage space continues to be processed.

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 Patents(China)
IPC IPC(8): G06F9/54H04L29/06H04L29/08
CPCH04L67/34G06F9/545G06F2209/541H04L67/01
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