[go: up one dir, main page]

CN110008032B - Communication mode realization method and electronic equipment - Google Patents

Communication mode realization method and electronic equipment Download PDF

Info

Publication number
CN110008032B
CN110008032B CN201810011048.0A CN201810011048A CN110008032B CN 110008032 B CN110008032 B CN 110008032B CN 201810011048 A CN201810011048 A CN 201810011048A CN 110008032 B CN110008032 B CN 110008032B
Authority
CN
China
Prior art keywords
microkernel
message
client
connection request
monitoring interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810011048.0A
Other languages
Chinese (zh)
Other versions
CN110008032A (en
Inventor
杨亮
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Junkai Technology Co ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810011048.0A priority Critical patent/CN110008032B/en
Publication of CN110008032A publication Critical patent/CN110008032A/en
Application granted granted Critical
Publication of CN110008032B publication Critical patent/CN110008032B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method for realizing a communication mode and electronic equipment, wherein a virtual service name is registered first, and a monitoring port of a microkernel is established; the method comprises the steps that a monitoring interface is sent to a plurality of clients based on acquisition requests of the clients, so that the clients send respective connection requests to the monitoring interface based on a monitoring interface; and then receiving respective connection requests sent by a plurality of clients, correspondingly creating a microkernel message session example for each connection request by using the thread of the microkernel information server, generating a connection response message of each microkernel message session example, and sending the connection response message to the client corresponding to each connection request. Therefore, the monitoring interface is established by registering a virtual service name, and the microkernel message session instance is correspondingly established for each connection request by using the thread of the microkernel information server to communicate with the respective client, so that the communication in a 'one-to-many' mode can be realized with a plurality of clients by using one monitoring interface.

Description

Communication mode realization method and electronic equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method for implementing a communication mode and an electronic device.
Background
Under the Mac OSX system, there are various methods for inter-process communication, such as CFMessagePort.
A CFMessagePort local port named "XXX" is created in process A by calling the CFMessagePort CreateLocalAPI of the CoreFoundation framework under the OSX system (create local interface API), and then a CFMessagePort remote port, also named "XXX", is created in another process B by calling CFMessagePort CreateRemote. Process a and process B thus establish a communication connection through a port named "XXX".
However, the above method is suitable only for one-to-one communication method and is not suitable for one-to-many communication methods. If process a is a server and process B is a client, the CFMessagePort solution is not suitable if there are multiple clients communicating with a server.
Disclosure of Invention
The invention provides a communication mode realization method and electronic equipment, which are used for solving or partially solving the technical problem that one-to-many communication cannot be realized under an OSX system at present.
In order to solve the above technical problem, the present invention provides a method for implementing a communication mode, where the method includes:
registering a virtual service name and establishing a monitoring interface of a microkernel;
sending the monitoring interface to a plurality of clients based on the acquisition requests of the plurality of clients, so that the plurality of clients send respective connection requests to the monitoring interface based on the monitoring interface;
receiving respective connection requests sent by the plurality of clients;
and correspondingly creating a microkernel message session instance for each connection request by utilizing the thread of the microkernel information server, generating a connection response message of each microkernel message session instance and sending the connection response message to the client corresponding to each connection request.
Preferably, the registering a virtual service name and creating a monitoring interface of the microkernel Mach includes:
and calling a bootstrap _ check _ in function of the OSX system, registering the character string corresponding to the virtual service name in the OSX system, and acquiring the monitoring interface.
Preferably, the receiving the respective connection requests sent by the multiple clients specifically includes:
and calling a macch _ msg system function by using a thread of the microkernel information server to receive a connection request from each client, wherein the connection request of each client carries a port name of each client.
Preferably, the correspondingly creating a microkernel message session instance for each connection request by using the thread of the microkernel information server specifically includes:
creating a MachMessageSession session instance for each connection request by calling an allocSession function of the microkernel information server;
calling a createFrom method of the MachMessageSession to initialize each MachMessageSession session instance, so that each MachMessageSession session instance comprises two parameters: port name of corresponding client, local port name.
Preferably, the sending the connection response message for generating each microkernel message session instance to the client corresponding to each connection request includes:
and packaging the local port name of each MachMessageSession session instance into each connection response message, and sending the local port name to the port of the corresponding client.
Preferably, after the connection response message for generating each microkernel message session instance is sent to the client corresponding to each connection request, the method further includes:
and putting each MachMessageSession session instance into an m _ sessions list for management.
Preferably, after each mach messagesession instance is put into the m _ sessions list for management, the method further includes:
and reading all MachMessageSession in the m _ sessions list in the recvSessionMsg function so as to obtain the communication message sent by the corresponding client.
The invention discloses an electronic device, comprising:
the registration module is used for registering a virtual service name and establishing a monitoring interface of the microkernel;
the sending module is used for sending the monitoring interface to a plurality of clients based on the acquisition requests of the clients, so that the clients send respective connection requests to the monitoring interface based on the monitoring interface;
a receiving module, configured to receive respective connection requests sent by the multiple clients;
and the creating module is used for correspondingly creating a microkernel message session example for each connection request by utilizing the thread of the microkernel information server, generating a connection response message of each microkernel message session example and sending the connection response message to the client corresponding to each connection request.
The invention discloses a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
The invention discloses a computer device, comprising a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the steps of the method when executing the program.
Through one or more technical schemes of the invention, the invention has the following beneficial effects or advantages:
the invention discloses a method for realizing a communication mode and electronic equipment, wherein the method comprises the following steps: registering a virtual service name and establishing a monitoring interface of a microkernel; the method comprises the steps that a monitoring interface is sent to a plurality of clients based on acquisition requests of the clients, so that the clients send respective connection requests to the monitoring interface based on the monitoring interface; then receiving respective connection requests sent by a plurality of clients, correspondingly creating a microkernel message session example for each connection request by using the thread of the microkernel information server, generating a connection response message of each microkernel message session example and sending the connection response message to the corresponding client. Therefore, the monitoring interface is established by registering a virtual service name, and the microkernel message session instance is correspondingly established for each connection request by using the thread of the microkernel information server to communicate with the respective client, so that the communication in a one-to-many mode can be realized with a plurality of clients by using one monitoring interface.
Drawings
Fig. 1 is a diagram of an implementation process of a method for implementing a communication mode according to an embodiment of the present invention;
fig. 2 is a schematic composition diagram of an electronic device according to an embodiment of the invention.
Detailed Description
In order to make the present application more clearly understood by those skilled in the art to which the present application pertains, the following detailed description of the present application is made with reference to the accompanying drawings by way of specific embodiments.
In the embodiment of the invention, the Mach microkernel concept of the OSX system is adopted. A one-to-many mode is realized by registering a virtual service name in a Mach micro-kernel and establishing a monitoring interface of the micro-kernel, and communicating with a plurality of clients by utilizing the monitoring interface. In a specific implementation process, firstly, the monitoring interface is sent to a plurality of clients based on acquisition requests of the plurality of clients, so that the plurality of clients send respective connection requests to the monitoring interface based on the monitoring interface; then receiving respective connection requests sent by the plurality of clients, correspondingly creating a microkernel message session example for each connection request by using the thread of the microkernel information server, generating a connection response message of each microkernel message session example, and sending the connection response message to the corresponding client. Therefore, the monitoring interface is established by registering a virtual service name, and the microkernel message session instance is correspondingly established for each connection request by using the thread of the microkernel information server to communicate with the respective client, so that the communication in a one-to-many mode can be realized with a plurality of clients by using one monitoring interface.
Mach microkernels are described below.
The OSX system is based on the Mach microkernel, in which all communication is based on the Mach Message, i.e., the Mach Message. In the Mach message, the most important concept is the concept of a Mach port, i.e., a Mach port. In the OSX system, messages are transferred from one Mach port to another.
Therefore, according to the OSX feature, the inter-process communication is realized by sending the message to the Mach port of the process B through the Mach port of the process a. The bottom layer of the CFMessagePort of the OSX system depends on the Mach port. Therefore, the method is a method for realizing one-to-many interprocess communication based on the Mach port according to the self-defined service name. At the beginning of the communication process, the server only needs to register a virtual (i.e. any non-existent) service name, and the client can establish a connection. Thereby enabling interprocess communication.
In the process of transmitting and receiving the Mach message, in the OSX, the message is received and transmitted through the macch _ msg. The first parameter of the function is a pointer to the map _ MSG _ header _ t, which indicates a message to be transmitted or received, the second parameter indicates whether a message is to be received or transmitted, which indicates a message to be transmitted when the value is MACH _ SEND _ MSG, which indicates a message to be received when the value is MACH _ RCV _ MSG, the third parameter indicates the size of data to be transmitted, and the fourth parameter indicates the size of data to be received. In this case, the message is received and transmitted by using the map _ msg according to the above method, and therefore, the detailed description thereof is omitted.
The macchmsg header t structure, which is a very important structure, is relied upon for the transmission and reception of any Mach message. The msgh _ size of the structure indicates the size of data to be transmitted or received, and msgh _ remote _ port indicates a remote port to which the field value must be set when a message is transmitted; msgh _ local _ port denotes a local port, and this field value must be set when a message is received.
The technical scheme has the following names:
the MachMessageServer, which represents a server for Mach communication, is used for processing a connection request from a MachMessageClient client through a specific service name character, and creating a MachMessageSession object representing a connection with the MachMessageClient.
The MachMessageSession represents a session device generated by a MachMessageServer class, and when the MachMessageServer detects a connection request from a MachMessageClient, a MachMessageSession instance is created, and then data communication is performed between the MachMessageSession instance and the MachMessageClient. A one-to-many concept is implemented here. One MachMessageServer instance communicates with each MachMessageClient through the MachMessageSession instance by creating multiple MachMessageSession instances.
And the MachMessageClient represents a client of Mach communication, sends a connection request to the MachMessageServer through a specific service name character, waits for the response of the request from the MachMessageServer, establishes a communication channel with the MachMessageServer if the request passes, and fails if the request is rejected.
The structure of the MachMessageConnect is a message used for establishing a connection request and sent by the MachMessageClient to the MachMessageServer in the case. The first field in this message is the header field of type macchmsg _ header _ t (any Mach message must include the header structure of this macchmsg _ header _ t and a string named portName, which represents the local Mach port name of the MachMessageClient.
The structure of the MachMessageConnectResult is a result message sent by the MachMessageServer to the MachMessageClient in this case for answering the connection request. Also the first field is the header field of the macchmsg _ header _ t, an integer field named sessionId, and a string named portName, which represents the remote Mach port name with which the Mach messageclient communicates.
With the above description of the mach messageserver, the mach messagesession, and the mach messageclient, how to establish a connection and receive data with each other will be described below.
Referring to fig. 1, in the implementation process of the present invention, a method for implementing a communication mode is disclosed, the method includes:
step 11, register a virtual service name, and create a monitoring interface of the microkernel.
In a specific implementation process, a bootstrap _ check _ in function of the OSX system is called, a character string corresponding to the virtual service name is registered in the OSX system, and the monitoring interface is obtained.
Further, the mach messageserver calls a bootstrap _ check _ in function of the OSX system, registers a character string with a service name of 'XXX' in the system, judges a return value of the function, if the return value of the function is 0, the registration service is successful, acquires a monitoring interface with a name of m _ listenPort, and proceeds to the following step 2). If the return value is not equal to 0, the registration service fails and the system is directly exited.
And step 12, sending the monitoring interface to a plurality of clients based on the acquisition requests of the plurality of clients, so that the plurality of clients send respective connection requests to the monitoring interface based on the monitoring interface.
And step 13, receiving respective connection requests sent by the plurality of clients.
Specifically, the embodiment of the invention calls and calls the map _ msg system function by using the thread of the microkernel information server to receive the connection request from each client, wherein the connection request of each client carries the port name of each client.
And step 14, correspondingly creating a microkernel message session instance for each connection request by using the thread of the microkernel information server, generating a connection response message of each microkernel message session instance, and sending the connection response message to the client corresponding to each connection request.
In the specific implementation process, a respective MachMessageSession session instance is created for each connection request mainly by calling an allocSession function of a microkernel information server; then, a createFrom method of the MachMessageSession is called to initialize each MachMessageSession session instance, so that each MachMessageSession session instance comprises two parameters: port name of corresponding client, local port name.
Further, the local port name of each mach messagesession instance is encapsulated into each connection response message, and is sent to the port of the corresponding client.
As an optional implementation manner, after the connection response message for generating each microkernel message session instance is sent to the corresponding client, each mach messagesession instance is also put into the m _ sessions list for management. Then, when the server and the client are in formal communication, all the mach messagesessions in the m _ sessions list are read in the recvsensingmsg function, so as to obtain the communication message sent by the corresponding client.
The above is the way in which the present invention establishes each mach messagesession instance for each client to communicate with the corresponding client. For ease of explanation and explanation of the present invention, the following embodiments will be described in terms of establishing communication between an instance of a mach messagesession and a client.
1) Registering service name and creating Mach monitoring interface
Calling a bootstrap _ check _ in function of an OSX system, registering a character string with a service name XXX in the system, judging a return value of the function, if the return value of the function is 0, representing that the registration service is successful, acquiring a monitoring interface with a name of m _ listenPort, and entering the following step 2). If the return value is not equal to 0, the registration service fails and the system is directly exited.
2) Creating a thread loop for a MachMessageServer
And after the calling in the last step is successful, creating a thread to circularly process the connection request from the client, and receiving the message of the MachMessageClient corresponding to each MachMessageSession. In the thread loop, the connection request from the client is processed by calling the listenPortLoop function of the MachMessageServer, and the message from the client is received by recvSessionMsg
3) Processing connection requests by listenPortLoop
In order to prevent the function from blocking a thread loop by calling the macch _ msg system function to receive a connection request from a client, a timeout time of 1 millisecond is set when the function is called. If the return value of the function is MACH _ MSG _ SUCCESS, it indicates that a Mach message was successfully received. Then, whether the msgh _ id field in the map _ msg _ header _ t structure of the message structure is equal to the MMT _ CONNECT value or not is judged, and if yes, the message is a connection request message with the type of MachMessageConnect. Proceeding to the following step a)
a) Creating a MachMessageSession
A MachMessageSession instance is created by calling the allocSession function of the MachMessageServer and the createFrom method of the MachMessageSession is called to initialize the session, which has two particularly important parameters, one is remotePortName, which represents the port name of the MachMessageClient, and one is localPortName, which represents the local port name of the session. When sending a MachMessageConnect connection request message to a MachMessageServer, a client carries a portName string, which is a remotePortName parameter required by createFrom, and localPortName is represented by generating a random GUID string. Inside the createFrom function, the remote port represented by remotePortName is obtained by calling bootstrap _ look _ up, labeled m _ remotePort, and a local port, labeled m _ localPort, is created by calling bootstrap _ check _ in. After completion, the MachMessageSession may send a message to the m _ remotePort and receive the message from the MachMessageClient through the m _ localPort.
b) Returning a connection request result message to the client
After createFrom in the above step is completed, a mach messagesession is successfully created to communicate with the mach messageclient. At this time, a message for connecting the messagemessageconnectioncorresult, which contains the localeportname string created in step a), must be sent to the mach messageclient. The MachMessageClient sends a message to the MachMessageSession through the port corresponding to the localPortName.
c) And putting the created MachMessageSession into an m _ sessions list for management.
4) recvSessionMsg receives client messages
And reading all MachMessageSession in the m _ sessions list in the recvSessionMsg function, namely calling a read method of the MachMessageSession to acquire the communication message from the MachMessageClient.
Client logic of MachMessageClient
The above describes how the mach messageserver listens for a connection request from the mach messageclient, creates a corresponding mach messagesession for data communication with the mach messageclient, and sends a mach messageconnectresult connection result message to the Client. The following mainly describes the main steps of MachMessageClient initiating connection request to Server
1) Obtaining service name port registered by MachMessageServer
Acquiring a monitoring interface with name XXX registered by the Server end by calling a bootstrap _ look _ up function, and if the return value of the function is equal to 0, entering the following step 2)
2) Creating a random guid string and creating a Mach Port through the string
And creating a random guid character string, calling bootstrap _ check _ in to acquire a port corresponding to the guid character end, and receiving the message by the Client depending on the port.
3) Sending a MachMessageConnect connection request message
Filling the guid character string in the step 2) into a portName field of the MachMessageConnect, and calling a macch _ msg function to send a connection request message to the Server.
4) Waiting for a connection request result
After the MachMessageConnect message is sent out, the machMessageConnectResult connection result message from the Server is received by calling the macch _ msg function. And then acquiring a portName field in a MachMessageConnectResult structure, and calling a bootstrap _ loop _ up function to acquire a remote Mach port corresponding to the portName, so that the Client can send a message to the MachMessageSession through the port.
By introducing the connection request and response to the MachMessageServer and the MachMessageclient, the method for performing one-to-many interprocess communication by using the Mach port is realized. When the communication process starts, the server only needs to register an arbitrary non-existent service name, and each client can establish connection. Thereby enabling interprocess communication.
Based on the same inventive concept, the embodiment of the present invention further discloses an electronic device, referring to fig. 2, including:
the registration module 21 is used for registering a virtual service name and establishing a monitoring interface of the microkernel;
a sending module 22, configured to send the monitoring interface to multiple clients based on acquisition requests of the multiple clients, so that the multiple clients send respective connection requests to the monitoring interface based on the monitoring interface;
a receiving module 23, configured to receive respective connection requests sent by the multiple clients;
the creating module 24 is configured to correspondingly create a microkernel message session instance for each connection request by using a thread of the microkernel information server, generate a connection response message of each microkernel message session instance, and send the connection response message to a client corresponding to each connection request.
Based on the same inventive concept as in the previous embodiments, the present invention also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of any of the methods described above.
Based on the same inventive concept as in the previous embodiments, the present invention also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any of the methods described above when executing the program.
Through one or more embodiments of the present invention, the present invention has the following advantageous effects or advantages:
the invention discloses a method for realizing a communication mode and electronic equipment, wherein a virtual service name is registered first, and a monitoring interface of a microkernel is established; the method comprises the steps that a monitoring interface is sent to a plurality of clients based on acquisition requests of the clients, so that the clients send respective connection requests to the monitoring interface based on the monitoring interface; then receiving respective connection requests sent by a plurality of clients, correspondingly creating a microkernel message session example for each connection request by using the thread of the microkernel information server, generating a connection response message of each microkernel message session example and sending the connection response message to the corresponding client. Therefore, the monitoring interface is established by registering a virtual service name, and the microkernel message session instance is correspondingly established for each connection request by using the thread of the microkernel information server to communicate with the respective client, so that the communication in a one-to-many mode can be realized with a plurality of clients by using one monitoring interface.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (8)

1. A method for implementing a communication mode is characterized by comprising the following steps:
registering a virtual service name in the Mach microkernel, and establishing a monitoring interface of the microkernel;
sending the monitoring interface to a plurality of clients based on the acquisition requests of the plurality of clients, so that the plurality of clients send respective connection requests to the monitoring interface based on the monitoring interface;
receiving respective connection requests sent by the plurality of clients;
correspondingly creating a microkernel message session instance for each connection request by utilizing the thread of the microkernel information server, generating a connection response message of each microkernel message session instance and sending the connection response message to a client corresponding to each connection request;
the correspondingly creating a microkernel message session instance for each connection request by using the thread of the microkernel information server specifically comprises:
creating a MachMessageSession session instance for each connection request by calling an allocSession function of the microkernel information server;
calling a createFrom method of the MachMessageSession to initialize each MachMessageSession session instance, so that each MachMessageSession session instance comprises two parameters: port name, local port name of the corresponding client;
the step of sending the connection response message for generating each microkernel message session instance to the client corresponding to each connection request includes:
and packaging the local port name of each MachMessageSession session instance into each connection response message, and sending the local port name to the port of the corresponding client.
2. The method of claim 1, wherein registering a virtual service name and creating a monitoring interface for a microkernel Mach comprises:
and calling a bootstrap _ check _ in function of the OSX system, registering the character string corresponding to the virtual service name in the OSX system, and acquiring the monitoring interface.
3. The method of claim 1, wherein the receiving the respective connection requests sent by the plurality of clients specifically comprises:
and calling a macch _ msg system function by using a thread of the microkernel information server to receive a connection request from each client, wherein the connection request of each client carries a port name of each client.
4. The method of claim 1, wherein after the generating the connection response message for each microkernel message session instance is sent to the client corresponding to each connection request, the method further comprises:
and putting each MachMessageSession session instance into an m _ sessions list for management.
5. The method of claim 1, wherein after placing each mach messagesession instance into an m _ sessions list for management, the method further comprises:
and reading all MachMessageSession in the m _ sessions list in the recvSessionMsg function so as to obtain the communication message sent by the corresponding client.
6. An electronic device, comprising:
the registration module is used for registering a virtual service name in the Mach microkernel and establishing a monitoring interface of the microkernel;
the sending module is used for sending the monitoring interface to a plurality of clients based on the acquisition requests of the clients, so that the clients send respective connection requests to the monitoring interface based on the monitoring interface;
a receiving module, configured to receive respective connection requests sent by the multiple clients;
the creating module is used for correspondingly creating a microkernel message session example for each connection request by utilizing the thread of the microkernel information server, generating a connection response message of each microkernel message session example and sending the connection response message to a client corresponding to each connection request;
the correspondingly creating a microkernel message session instance for each connection request by using the thread of the microkernel information server specifically comprises:
creating a MachMessageSession session instance for each connection request by calling an allocSession function of the microkernel information server;
calling a createFrom method of the MachMessageSession to initialize each MachMessageSession session instance, so that each MachMessageSession session instance comprises two parameters: port name, local port name of the corresponding client;
the step of sending the connection response message for generating each microkernel message session instance to the client corresponding to each connection request includes:
and packaging the local port name of each MachMessageSession session instance into each connection response message, and sending the local port name to the port of the corresponding client.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1-5 are implemented when the program is executed by the processor.
CN201810011048.0A 2018-01-05 2018-01-05 Communication mode realization method and electronic equipment Active CN110008032B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810011048.0A CN110008032B (en) 2018-01-05 2018-01-05 Communication mode realization method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810011048.0A CN110008032B (en) 2018-01-05 2018-01-05 Communication mode realization method and electronic equipment

Publications (2)

Publication Number Publication Date
CN110008032A CN110008032A (en) 2019-07-12
CN110008032B true CN110008032B (en) 2021-11-09

Family

ID=67164559

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810011048.0A Active CN110008032B (en) 2018-01-05 2018-01-05 Communication mode realization method and electronic equipment

Country Status (1)

Country Link
CN (1) CN110008032B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112398845B (en) * 2020-11-11 2023-03-28 Oppo广东移动通信有限公司 Data transmission method, data transmission device, data transmission system and electronic equipment
CN112667419B (en) * 2021-01-04 2024-10-22 南京海兴电网技术有限公司 Multi-process communication method based on client server model
CN115718625B (en) * 2022-11-21 2025-08-26 北京有竹居网络技术有限公司 Device driving method, device and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102224714A (en) * 2008-11-20 2011-10-19 日本电气株式会社 Client - server communications in mobile radio communications device
CN103414885A (en) * 2013-08-22 2013-11-27 济南中维世纪科技有限公司 Communication method of network audio-video monitoring system
CN106850698A (en) * 2017-04-06 2017-06-13 广东浪潮大数据研究有限公司 A kind of User space RPC agreement multithreading optimization methods and system
CN106997307A (en) * 2017-02-13 2017-08-01 上海大学 A kind of Socket thread pool design methods towards multiple terminals radio communication
CN107172572A (en) * 2017-04-25 2017-09-15 李蕊 Virtual connections method based on low-power consumption bluetooth and the wireless charging agreement using this method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102224714A (en) * 2008-11-20 2011-10-19 日本电气株式会社 Client - server communications in mobile radio communications device
CN103414885A (en) * 2013-08-22 2013-11-27 济南中维世纪科技有限公司 Communication method of network audio-video monitoring system
CN106997307A (en) * 2017-02-13 2017-08-01 上海大学 A kind of Socket thread pool design methods towards multiple terminals radio communication
CN106850698A (en) * 2017-04-06 2017-06-13 广东浪潮大数据研究有限公司 A kind of User space RPC agreement multithreading optimization methods and system
CN107172572A (en) * 2017-04-25 2017-09-15 李蕊 Virtual connections method based on low-power consumption bluetooth and the wireless charging agreement using this method

Also Published As

Publication number Publication date
CN110008032A (en) 2019-07-12

Similar Documents

Publication Publication Date Title
US11444986B2 (en) Device triggering
CN108965484B (en) Internet of things data transmission method, system and terminal
CN109815025B (en) Service model calling method, device and storage medium
CN109857572B (en) Method, device and equipment for realizing remote calling and computer readable storage medium
CN110008032B (en) Communication mode realization method and electronic equipment
CN110958281A (en) Data transmission method and communication device based on Internet of things
CN112181681A (en) Remote calling method and device, computer equipment and storage medium
CN102752230A (en) Method and system for sharing subscriber relationship chain
CN110008033B (en) Method for communicating with client and electronic equipment
CN106055413A (en) Method, device, server and system for transmitting application configuration items of smart watches
CN110022332B (en) Hypertext transfer security protocol proxy method, device, equipment and medium
CN107995184B (en) Connector and communication method using same
CN114363204B (en) Request monitoring method, network device and storage medium
CN110012042B (en) Communication mode optimization method and electronic equipment
CN114189384B (en) Service processing method, device, equipment and storage medium
CN114553956A (en) Data transmission method and system based on UEP middleware
CN108040000A (en) A kind of information transferring method and equipment
CN111490997B (en) Task processing method, proxy system, service system and electronic equipment
CN109582481B (en) Transmission method, device and equipment of call result and storage medium
CN107395583B (en) Method and device for realizing communication between different applications based on natural language
CN117201577B (en) Communication method and system of cross-platform API and SPI based on PISA
CN110896414A (en) Method for realizing message notification between services by using IOT (Internet of things)
CN115022224B (en) A method, device and equipment for processing session establishment
US20090300212A1 (en) Heuristics processing
CN115150388B (en) File uploading and file uploading state query method and equipment and storage medium thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240204

Address after: Room 101-1, Building 2, No. 95 Daguan Middle Road, Tianhe District, Guangzhou City, Guangdong Province, 510000

Patentee after: Guangzhou Zhongtian Technology Consulting Co.,Ltd.

Country or region after: China

Address before: 430000 East Lake Development Zone, Wuhan City, Hubei Province, No. 1 Software Park East Road 4.1 Phase B1 Building 11 Building

Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240428

Address after: Room 905, 9th Floor, Chong'an Shengshi Center, No. 303 Pingshui Street, Gongshu District, Hangzhou City, Zhejiang Province, 310000

Patentee after: Hangzhou Junkai Technology Co.,Ltd.

Country or region after: China

Address before: Room 101-1, Building 2, No. 95 Daguan Middle Road, Tianhe District, Guangzhou City, Guangdong Province, 510000

Patentee before: Guangzhou Zhongtian Technology Consulting Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right