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

An inter-process communication and electronic device technology, applied in the electronic field, can solve the problems of insufficient client authority, inability to connect to the named pipe server, abnormal communication connection between the server and the client, etc.

Active Publication Date: 2018-11-16
WUHAN DOUYU NETWORK TECH CO LTD
View PDF7 Cites 4 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 equipment and readable storage medium
  • Inter-process communication method, electronic equipment and readable storage medium
  • Inter-process communication method, electronic equipment 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. The method for performing asynchronous data communication between one server process and a plurality of client processes through named pipes of Windows is provided. The method comprises the steps of creating a service thread; calling an accept function, and creating overlapped IOs andcalling a CreateNamedPipe function with a preset security access attribute to create asynchronous named pipe handles, transmitting the named pipe handles into Pointer fields of the overlapped IOs, calling a ConnectNamedPipe function, asynchronously waiting for asynchronous tasks from a client, and storing the overlapped IOs into storage spaces corresponding to the asynchronous tasks; and cyclically viewing the overlapped IOs in the first storage space, the second storage space and the third storage space through a service thread, and if it is viewed that the processing of the current overlapped IO is completed, continuing to process the overlapped 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
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 Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products