Method for processing socket, method and apparatus for transmitting packet data
First Claim
1. A method for transmitting packet data in a plurality of co-existed network links by a terminal which comprises an operating system, comprising:
- obtaining, by a connection management application module in a processor, a SOCKET identifier which is created for each service application of a plurality of service applications;
for each service application of the plurality of service applications;
prompting, by the connection management application module, a user to select a specified network link from all supported network links for the service application, andreceiving, by the connection management application module the specified network link selected by the user;
for each specified network link;
searching for, by the connection management application module, an IP address of the specified network link;
transmitting, by the connection management application module, the SOCKET identifier of the service application corresponding to the specified network link, the IP address of the specified network link, and a link modification instruction to the TCP/IP protocol stack,finding, by the TCP/IP protocol stack, a SOCKET file description information of a process where the service application corresponding to the specified network link is located, according to the SOCKET identifier of the service application corresponding to the specified network link, wherein when the SOCKET file description information is not found in a current process, the SOCKET file description information is searched for on other processes by traversing all processes on the operating system, andmodifying an existing source IP address included in the SOCKET file description information into the IP address of the specified network link according to the link modification instruction for transmitting and receiving the packet data through the specified network link;
transmitting and receiving, by the plurality of service applications, packet data on the specified network links for each of the plurality of service applications at the same time.
1 Assignment
0 Petitions
Accused Products
Abstract
Disclosed is a method for processing a SOCKET, a method and an apparatus for transmitting packet data, wherein, the method for processing a SOCKET comprises: a connection management application obtaining a SOCKET identifier corresponding to each service application, and transmitting the SOCKET identifier and a modification instruction to a TCP/IP (Transmission Control Protocol/Internet Protocol) protocol stack; the TCP/IP protocol stack searching for SOCKET file description information corresponding to the SOCKET identifier, and modifying the SOCKET file description information according to the modification instruction. After adopting the technical solution mentioned above, the IP binding operation across applications can be performed on a single-process or multi-process operating system, and the application level traffic selection of the different data connection can be performed according to intention of a user.
37 Citations
4 Claims
-
1. A method for transmitting packet data in a plurality of co-existed network links by a terminal which comprises an operating system, comprising:
-
obtaining, by a connection management application module in a processor, a SOCKET identifier which is created for each service application of a plurality of service applications; for each service application of the plurality of service applications; prompting, by the connection management application module, a user to select a specified network link from all supported network links for the service application, and receiving, by the connection management application module the specified network link selected by the user; for each specified network link; searching for, by the connection management application module, an IP address of the specified network link; transmitting, by the connection management application module, the SOCKET identifier of the service application corresponding to the specified network link, the IP address of the specified network link, and a link modification instruction to the TCP/IP protocol stack, finding, by the TCP/IP protocol stack, a SOCKET file description information of a process where the service application corresponding to the specified network link is located, according to the SOCKET identifier of the service application corresponding to the specified network link, wherein when the SOCKET file description information is not found in a current process, the SOCKET file description information is searched for on other processes by traversing all processes on the operating system, and modifying an existing source IP address included in the SOCKET file description information into the IP address of the specified network link according to the link modification instruction for transmitting and receiving the packet data through the specified network link; transmitting and receiving, by the plurality of service applications, packet data on the specified network links for each of the plurality of service applications at the same time. - View Dependent Claims (2)
-
-
3. An apparatus for transmitting packet data in a plurality of co-existed network links by a terminal which comprises an operating system, comprising a connection management application module and the operating system comprises a Transmission Control Protocol/Internet Protocol (TCP/IP) protocol stack, wherein,
the connection management application module is configured to: -
obtain a SOCKET identifier which is created for each service application of a plurality of service applications, for each service application of the plurality of service applications; give a prompt for a user to select a specified network link from all supported network links for the service application, and receive the specified network link selected by the user, and for each specified network link; search for an IP address of the specified network link, and transmit the SOCKET identifier of the service application corresponding to the specified network link, the IP address of the specified network link, and a link modification instruction to the TCP/IP protocol stack; the TCP/IP protocol stack is configured to, for each specified network link; find a SOCKET file description information of a process where the service application corresponding to the specified network link is located, according to the SOCKET identifier of the service application corresponding to the specified network link, wherein when the SOCKET file description information is not found in a current process, the SOCKET file description information is searched for on other processes by traversing all processes on the operating system, and modify an existing source IP address included in the SOCKET file description information into the IP address of the specified network link according to the link modification instruction for transmitting and receiving the packet data of the service application through the specified network link; and the plurality of service applications are configured to transmit and receive the packet data on the specified network links at the same time. - View Dependent Claims (4)
-
Specification