Method and device for processing multi-client access by using asynchronous non-blocking mode
A mode processing, multi-client technology, applied in the field of communication, can solve problems such as high cost, and achieve the effect of strong market application prospects
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0038] This example is disclosed figure 1 A method of processing multi-client access using asynchronous non-blocking mode, including the following steps:
[0039] S1 initializes the main working group and turn on the main thread M. After the binding listening to the IP + port, turn on the MAIN workgroup thread pool MPool and start the polling;
[0040] S2 Initialization Request Queue RQ and SELECTOR Multi-Double Selector; Turn on the Sub Workgroup Main Thread S and Start Polling Selector, open the SUB Workgroup Thread Pool Spool, initialize the ready queue WQ;
[0041]After the S3 thread M listens to the client Accept request, place the ACCPET request in RQ, MPOOL polling RQ, when the RQ is requested, the request data is obtained, and the request data is assigned to each of the MPOOL. Thread;
[0042] S4 processes the Accept request, perform authentication, handshake, login operation, generate the corresponding Channel, and register into the Selector;
[0043] S5 threads poll the ...
Embodiment 2
[0053] This example discloses a method of processing multi-client access using asynchronous non-blocking modes, specifically, the server is used to process the overall scheme design of multi-client access, including multi-way multiplexing technology, efficient Thread model design.
[0054] This embodiment multiplexed techniques include:
[0055] The server authenticates the client's Accept request, including identity authentication, handshake, login operation;
[0056] After the above operation is completed and authenticated, the server generates the corresponding Channel according to the Accept request, and registers the multiplexer Selector;
[0057] Selector constantly polls the Channel to Channel, put the ready Channel in the corresponding collection;
[0058] The other modules of the server will poll the collection of the Selector, remove the ready Channel, and perform business processing.
[0059] The efficient thread model design of this embodiment includes:
[0060] The th...
Embodiment 3
[0063] This embodiment discloses a method of processing a multi-client access, and the flow is as follows:
[0064] Server initialization Main Workgroup: Enable the main thread M, binding listener IP + port;
[0065] Enable the MAIN workgroup thread pool MPool and start the polling; initialize the request queue RQ; initialize the Selector multiplex selector;
[0066] Service Initialization Sub Working Group: Open the Sub Workgroup Main Thread S and Start Polling Selector; turn on the SUB Workgroup thread pool spool; initialize the ready queue WQ;
[0067] Thread M listens to the client Accept request, put the ACCPET request in RQ;
[0068] MPOOL polling RQ, when RQ has request data, obtain request data, assisted with load balancing to each thread in MPool, such as figure 1 Process 101;
[0069] The thread in the mpool processes the Accept request, authenticate, handshake, login operation;
[0070] After the thread in the mpool processes the Accept request, generate the correspondi...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com