Asynchronous I/O operation method and device based on socket
An asynchronous operation, socket technology, applied in the field of network communication, can solve problems such as universal discount
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0038] A method for socket-based asynchronous I / O operations of the present embodiment comprises the following steps:
[0039] Management socket creation steps: create a socket to be used as a management socket, and bind it to the local address. The management socket is used to receive asynchronous operation requests from all users, and convert the asynchronous operation requests into specific operation objects and object attributes of the proxy thread described below. Object properties include: operation type, data storage space and asynchronous processing method, etc.
[0040] Proxy thread creation steps: Create a thread as a proxy thread to serve all users' asynchronous operation requests. Add the management socket to the operation object set of the proxy thread, and set its object properties. Add the management socket to the read operation control information of the I / O multiplexing function (such as the select function), and call the I / O multiplexing function. Because ...
Embodiment 2
[0055] A socket-based asynchronous I / O operation method in this embodiment includes two stages of starting and running.
[0056] One: Start-up phase:
[0057] Management socket creation steps: Create a non-connection type UDP socket, for the convenience of description, the following description calls it OpsSock. Bind the socket to the local loopback address 127.0.0.1. The binding port can be statically specified or automatically selected by the operating system;
[0058] Because the scheme of this embodiment relies on the standard socket interface function (such as select, poll or epoll) for realizing I / O multiplexing, so, in order to illustrate this implementation scheme more clearly, its function is now briefly described. Take the select function as an example (other functions such as poll and epoll have similar functions although their interfaces are different), this function can simultaneously track multiple user-specified sockets, and its interface is defined as follows...
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