Summary of the invention
In order to address the above problem, the embodiment of the invention discloses a kind of method and device that network connects of setting up, concrete technical scheme is as follows:
Set up the method that network connects, be applied to server, described server comprises a plurality of network ports, and described method comprises:
Obtain the request message that client sends, the request message that described client sends carries the communication mode information that this client and described server communicate;
According to default communication mode information and the corresponding relation of the network port in described server, obtain the port information corresponding to the network port of the communication mode information in described request message;
Obtained port information is sent to described client so that described client with corresponding to the network port of this port information, set up network and be connected.
Optionally, the communication mode information that described basis is default and the corresponding relation of the network port in described server, obtain the port information corresponding to the network port of the communication mode information in described request message, comprising:
According to default communication mode information and the corresponding relation of the network port in described server, determine the network port corresponding to the communication mode information in described request message;
Obtain the port information of a network port in idle condition in the determined network port.
Optionally, a plurality of network ports that described server comprises all carry type identification; Described method also comprises:
The in running order duration of all types of network ports in the default duration of statistics first;
Increase the port number of the network port of target type, described target type is the affiliated port type of the network port that work duration surpasses the first predetermined threshold value.
Optionally, described method also comprises:
Add up the quantity of the in running order network port;
The quantitative value that statistics is obtained outputs to display device, so that user can monitor the port service condition of server.
Optionally, described method also comprises:
Obtain the state information of the network port;
The state information of the network port getting is outputed to display device, so that the port working monitoring state that user can be to server.
Optionally, the communication mode of described client and described server is long connected mode or short connected mode; When the communication mode of described client and described server is long connected mode, described method also comprises:
In the default duration of monitoring second, described client is connected disconnection times with the network between the network port;
The network port that disconnection times is reached to the second predetermined threshold value is labeled as fault;
Determine in described server corresponding to the current communication mode of described client, unmarked be the network port of fault, obtain the port information of a network port in the determined network port;
This port information is sent to described client so that described client with corresponding to the network port of this port information, set up network and be connected.
Set up the method that network connects, be applied to client, described method comprises:
To server, send a request message, described request message carries the communication mode information that described client and this server communicate;
Receive described server after obtaining described request message, the port information of the network port corresponding to the communication mode information in this request message of transmission; In described server, store default communication mode information and the corresponding relation of the network port in described server;
The network of setting up the network port corresponding with received port information connects.
Set up the device that network connects, be applied to server, described server comprises a plurality of network ports, and described device comprises:
Message acquisition module, the request message sending for obtaining client, the request message that described client sends carries the communication mode information that this client and described server communicate;
The first information obtains module, for according to the corresponding relation of the network port of default communication mode information and described server, obtains the port information of the network port of the communication mode information in the request message obtaining corresponding to described message acquisition module;
First information sending module, sends to described client for the described first information being obtained to the port information that module obtains so that described client with corresponding to the network port of this port information, set up network and be connected.
Optionally, the described first information obtains module, comprising:
Port is determined submodule, for according to the corresponding relation of the network port of default communication mode information and described server, determines the network port of the communication mode information in the request message obtaining corresponding to described message acquisition module;
Information acquisition submodule, determines the port information of the network port of the determined network port of submodule in idle condition for obtaining described port.
Optionally, a plurality of network ports that described server comprises all carry type identification; Described device also comprises:
Duration statistical module, for adding up the in running order duration of all types of network ports in the first default duration;
Port number increases module, and for increasing the port number of the network port of target type, described target type is that work duration surpasses the port type under the network port of the first predetermined threshold value.
Optionally, described device also comprises:
Quantity statistics module, for adding up the quantity of the in running order network port;
The first output module, outputs to display device for the quantitative value that described quantity statistics module statistics is obtained, so that user can monitor the port service condition of server.
Optionally, described device also comprises:
State information acquisition module, for obtaining the state information of the network port;
The second output module, outputs to display device for the state information of the network port that described state information acquisition module is got, so that the port working monitoring state that user can be to server.
Optionally, the communication mode of described client and described server is long connected mode or short connected mode; When the communication mode of described client and described server is long connected mode, described device also comprises:
Monitoring modular, is connected disconnection times for monitoring described client in the second default duration with the network between the network port;
Mark module, for by described monitoring module monitors to the disconnection times network port that reaches the second predetermined threshold value be labeled as fault;
The second information acquisition module, for determine described server corresponding to the current communication mode of described client, unmarked be the network port of fault, obtain the port information of a network port in the determined network port;
The second information sending module, sends to described client for the port information that described the second information acquisition module is obtained so that described client with corresponding to the network port of this port information, set up network and be connected.
Set up the device that network connects, be applied to client, described device comprises:
Message transmission module, for sending a request message to server, described request message carries the communication mode information that described client and this server communicate;
Information receiving module, for receiving described server after obtaining the request message that described message transmission module sends, the port information of the network port corresponding to the communication mode information in this request message of transmission; In described server, store default communication mode information and the corresponding relation of the network port in described server;
Network connects sets up module, for setting up the network of the network port that the port information received with described information receiving module is corresponding, connects.
The method that the embodiment of the present invention provides and device, after obtaining the request message of client transmission, can be according to default communication mode information and the corresponding relation of the network port in server, determine the port information corresponding to the network port of the communication mode information in described request message, and determined port information is sent to described client so that described client with corresponding to the network port of this port information, set up network and be connected.
Compared with prior art, network port change in server, the request message that the embodiment of the present invention still can send according to this client, determines the port information corresponding to the network port of this request message, then this port information is sent to client, so that both set up network, connect.
Embodiment
In order to make those skilled in the art understand better the technical scheme in the present invention, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
As one of nucleus equipment of the network equipment, server in the forwarding of message, the storage of content and the aspect such as issue in occupation of leading position.Server generally includes the network port of a plurality of types, and the dissimilar network port provides different functions.The function that client executing is different just need to be connected on the different network port of this server, such as downloading software when carrying out its download function, just need to be connected on the download network port of corresponding server.
Existing foundation in the method that network connects, the document that records client functionality and network port corresponding relation that client need to be pre-stored according to this locality, finds in this server the network port that should item function, carries out network connection.But when the network port upgrading in server or port number change, client just can not, according to original document that records client functionality and network port corresponding relation, cannot find corresponding port.In order to address the above problem, a kind of method and device of setting up network connection that the embodiment of the present invention provides.
First a kind of method of the setting up network connection embodiment of the present invention being provided is below introduced.
It should be noted that, embodiment of the present invention method is applicable in server, and described server comprises a plurality of network ports; In actual applications, this server can be the IM chat server based on netty exploitation.
As shown in Figure 1, a kind of method of setting up network connection that the embodiment of the present invention provides, is applied to server, and described server comprises a plurality of network ports, and the method can comprise:
S101, obtains the request message that client sends, and the request message that described client sends carries the communication mode information that this client and described server communicate.
It should be noted that, from broadly, communication mode can be divided into: long connected mode, and short connected mode, wherein, long connected mode refers in a connection and can send continuously a plurality of packets, during connecting maintenance, if there is no Packet Generation, need both sides to send out link detecting bag; Short connected mode refers to when communication two party has data interaction, just sets up a connection, after data are sent completely, disconnect this and connects, i.e. each connection only completes the transmission of a business.Such as, when client is carried out website and webpage access, the communication mode of employing is short connected mode; When chat tool carries out Internet chat, the communication mode of employing is long connected mode.
Concrete, in actual applications, long connected mode can comprise the communication mode of the type of chatting; Short connected mode can comprise: the communication mode of the communication mode of type of payment, the communication mode of type of download or website visiting type.While carrying out network payment such as the means of payment, the communication mode of employing is exactly the communication mode of type of payment; Download tool is during from network downloading contents, and the communication mode of employing is exactly the communication mode of type of download.
In addition, client functionality is diversified development, in server, the division of labor of the network port is more and clearer and more definite, the network port of one type is conventionally only for client provides a kind of function, such as, payment network port in server can only provide network on-line payment function for the means of payment, and download network port can only provide network download online function for download tool, and the website network port can only provide online access web sites function for website visiting instrument.It should be noted that, above-mentioned is only an instantiation of the embodiment of the present invention, and the embodiment of the present invention includes but not limited to above example.
Be understandable that, before realizing a certain function, client must be obtained the port information of the network port that can realize this function, so that according to the port information getting, the network that builds on this network port connects, thereby realizes its function.
In embodiments of the present invention, because server comprises numerous network ports, and the function that the network port of each type provides is different, therefore, the request message that this just needs server to send according to client, finds the network port corresponding to the current execution function of client.
Further, due to the corresponding a kind of communication mode only conventionally of a certain type network port in server, only, in the situation that adopting this communication mode, client could be set up network with this network port and be connected.Therefore, this just needs server according to the request message that carries communication mode information, from numerous network ports, to find the network port corresponding to the current execution function of client.
S102, according to default communication mode information and the corresponding relation of the network port in described server, obtains the port information corresponding to the network port of the communication mode information in described request message.
It should be noted that, in actual applications, after completing the definition of local network port or upgrading, server can generate in this locality the file that record the network port and communication mode corresponding relation, so that the use while carrying out searching of the network port of this server.
Further, after communication mode information in the request message that obtains client transmission, can, according to the file that records the corresponding relation of the network port in communication mode information and server in this locality, first determine in this server, which the network port corresponding with this communication mode information have; Afterwards, can, from the determined network port, select one for carrying out with this client the network port that network is connected, and obtain the port information of this network port.
Concrete, in an execution mode of the embodiment of the present invention, as shown in Figure 2, above-mentioned S102, can comprise:
S102a, according to default communication mode information and the corresponding relation of the network port in described server, determines the network port corresponding to the communication mode information in described request message.
Be understandable that, in server, the network port of a type comprises a plurality of network ports conventionally, and this server can, according to a kind of communication mode, find a plurality of network ports corresponding to this communication mode.
S102b, obtains the port information of a network port in idle condition in the determined network port.
Preferably, in order to guarantee that setting up network with this server is more quickly connected, can obtain the port information of a network port in idle condition in the determined network port.
S103, sends to described client by obtained port information so that described client with corresponding to the network port of this port information, set up network and be connected.
In embodiments of the present invention, at the port information obtaining corresponding to the network port of obtained communication mode information, obtained port information need to be sent to described client, so that described client is set up network with the network port of port information corresponding to sent, be connected.
As can be seen here, the method of setting up network connection that the embodiment of the present invention provides, after obtaining the request message of client transmission, can be according to default communication mode information and the corresponding relation of the network port in server, determine the port information corresponding to the network port of the communication mode information in described request message, and determined port information is sent to described client so that described client with corresponding to the network port of this port information, set up network and be connected.
Compared with prior art, network port change in server, the request message that the embodiment of the present invention still can send according to this client, determines the port information corresponding to the network port of this request message, then this port information is sent to client, so that both set up network, connect.
Optionally, in one embodiment of the invention, a plurality of network ports that described server comprises all carry type identification; The method of setting up network connection that the embodiment of the present invention provides can also increase S104 and S105 on the basis of method shown in Fig. 1.
It should be noted that, S104 and S105 both can carry out according to the execution sequence of method shown in Fig. 3, also can with method shown in Fig. 1 in each step executed in parallel, the embodiment of the present invention is not construed as limiting this.Below S104 and S105 are described in detail.
S104, the in running order duration of all types of network ports in the default duration of statistics first.
Such as the first default duration is 1 hour, server comprises 4 kinds of network ports, be respectively the first kind network port, the Equations of The Second Kind network port, the 3rd class network port, the 4th class network port, wherein, in the first kind network port, there are 3 network ports, in the Equations of The Second Kind network port, there are 3 network ports, in the 3rd class network port, there are 4 network ports, in the 4th class network port, there are 5 network ports, in 1 hour, in the first kind network port, the total duration of the work of 3 network ports is 20 minutes, in the Equations of The Second Kind network port, the total duration of the work of 3 network ports is 30 minutes, in the 3rd class network port, the total duration of work of 4 network ports is 50 minutes, in the 4th class network port, the total duration of work of 5 network ports is 30 minutes.
It should be noted that, can the value of the default duration of first in the embodiment of the present invention be adjusted according to actual conditions, the embodiment of the present invention does not limit this.
S105, the port number of the network port of increase target type, described target type is the affiliated port type of the network port that work duration surpasses the first predetermined threshold value.
Such as the first predetermined threshold value is 45 minutes, because the total duration of work of 4 network ports in above-mentioned the 3rd class network port is 50 minutes, surpassed 45 minutes, therefore can increase the port number of the network port in the 3rd class network port.
It should be noted that, can the value of the first predetermined threshold value in the embodiment of the present invention be adjusted according to actual conditions, the embodiment of the present invention does not limit this.
As can be seen here, the embodiment of the present invention provides sets up the method that network connects, can be according to the actual service condition of each network port, and the port number of all types of network ports in this server of accommodation, has improved the port utilization ratio of server.
Optionally, in one embodiment of the invention, the method for setting up network connection that the embodiment of the present invention provides can also increase S106 and S107 on the basis of method shown in Fig. 1.
It should be noted that, S106 and S107 both can carry out according to the execution sequence of method shown in Fig. 4, also can with method shown in Fig. 1 in each step executed in parallel, the embodiment of the present invention is not construed as limiting this.Below S106 and S107 are described in detail.
S106, the quantity of adding up the in running order network port.
Optionally, in execution mode of the embodiment of the present invention, can add up the quantity of the network port in running order under current time.
Optionally, in an execution mode of the embodiment of the present invention, can be according to the default time cycle, periodically add up the quantity of the in running order network port.
Optionally, in an execution mode of the embodiment of the present invention, can add up in real time the quantity of the in running order network port.
S107, the quantitative value that statistics is obtained outputs to display device, so that user can monitor the port service condition of server.
Further, after the quantity of the in running order network port of statistics, the quantitative value output that statistics can be obtained, monitors, analyzes for user, and then improves user's responding ability and operating efficiency.
Optionally, in one embodiment of the invention, the method for setting up network connection that the embodiment of the present invention provides can also increase S108 and S109 on the basis of method shown in Fig. 1.
It should be noted that, S108 and S109 both can carry out according to the execution sequence of method shown in Fig. 5, also can with method shown in Fig. 1 in each step executed in parallel, the embodiment of the present invention is not construed as limiting this.Below S108 and S109 are described in detail.
S108, obtains the state information of the network port.
Optionally, in execution mode of the embodiment of the present invention, can obtain the state information of current time lower network port.
Optionally, in an execution mode of the embodiment of the present invention, can, according to the default time cycle, periodically obtain the state information of the network port.
Optionally, in an execution mode of the embodiment of the present invention, can obtain in real time the state information of the network port.
S109, outputs to display device by the state information of the network port getting, so that the port working monitoring state that user can be to server.
Further, after obtaining the state information of the network port, can, by the state information output of the network port getting, for user, monitor, analyze, and then improve user's responding ability and operating efficiency.
Optionally, in one embodiment of the invention, the communication mode of described client and described server is long connected mode or short connected mode; When the communication mode of described client and described server is long connected mode, the method for setting up network connection that the embodiment of the present invention provides can also increase S110, S111, S112 and S113 on the basis of method shown in Fig. 1.
It should be noted that, S110, S111, S112 and S113 both can carry out according to the execution sequence of method shown in Fig. 6, also can with method shown in Fig. 1 in each step executed in parallel, the embodiment of the present invention is not construed as limiting this.Below S110, S111, S112 and S113 are described in detail.
S110, in the default duration of monitoring second, described client is connected disconnection times with the network between the network port.
Be understandable that, when the communication mode of client and server is long connected mode, this client and server need to keep network connection state within a certain period of time, such as chat tool is when carrying out online chatting, just need to remain with server in network connection state.If during this period, client is connected often disconnection with the network of server, such as chat tool often goes offline, will affect user's experience.
Based on the problems referred to above, the embodiment of the present invention can be connected disconnection times to client and network between the network port monitors, and further, can monitor described client in the second default duration and be connected disconnection times with the network between the network port.
It should be noted that, can the value of the default duration of second in the embodiment of the present invention be adjusted according to actual conditions, the embodiment of the present invention does not limit this.
S111, the network port that disconnection times is reached to the second predetermined threshold value is labeled as fault.
It should be noted that, can the value of the second predetermined threshold value in the embodiment of the present invention be adjusted according to actual conditions, the embodiment of the present invention does not limit this.
As can be seen here, the method for setting up network connection that the embodiment of the present invention provides, can automatically detect network connection and have the abnormal network port, and be fault by this port label, thus the quick positioning equipment fault of aspect O&M personnel.
S112, determine in described server corresponding to the current communication mode of described client, unmarked be the network port of fault, obtain the port information of a network port in the determined network port.
S113, sends to described client by this port information so that described client with corresponding to the network port of this port information, set up network and be connected.
As shown in Figure 7, a kind of method of setting up network connection that the embodiment of the present invention provides, is applied to client, and the method can comprise:
S701, sends a request message to server, and described request message carries the communication mode information that described client and this server communicate.
It should be noted that, from broadly, communication mode can be divided into: long connected mode, and short connected mode, wherein, long connected mode refers in a connection and can send continuously a plurality of packets, during connecting maintenance, if there is no Packet Generation, need both sides to send out link detecting bag; Short connected mode refers to when communication two party has data interaction, just sets up a connection, after data are sent completely, disconnect this and connects, i.e. each connection only completes the transmission of a business.Such as, when client is carried out website and webpage access, the communication mode of employing is short connected mode; When chat tool carries out Internet chat, the communication mode of employing is long connected mode.
Concrete, in actual applications, long connected mode can comprise the communication mode of the type of chatting; Short connected mode can comprise: the communication mode of the communication mode of type of payment, the communication mode of type of download or website visiting type.While carrying out network payment such as the means of payment, the communication mode of employing is exactly the communication mode of type of payment; Download tool is during from network downloading contents, and the communication mode of employing is exactly the communication mode of type of download.
S702, receives described server after obtaining described request message, the port information of the network port corresponding to the communication mode information in this request message of transmission; In described server, store default communication mode information and the corresponding relation of the network port in described server.
S703, the network of setting up the network port corresponding with received port information connects.
It should be noted that, in actual applications, after completing the definition of local network port or upgrading, server can generate in this locality the file that record the network port and communication mode corresponding relation, so that the use while carrying out searching of the network port of this server.
Further, after communication mode information in the request message that obtains client transmission, server can, according to the file that records the corresponding relation of the network port in communication mode information and server in this locality, first determine in this server, which the network port corresponding with this communication mode information have; Afterwards, can, from the determined network port, select one and obtain the port information of this network port for carrying out with this client the network port that network is connected, and this port information is sent to client.
The port information that client in the embodiment of the present invention can reception server sends, and according to this port information, sets up the network connection of the network port corresponding with this port information.
As can be seen here, the method of setting up network connection that the embodiment of the present invention provides, can send the request message that carries communication mode information to server, and receive described server after obtaining described request message, the port information of the network port corresponding to the communication mode information in this request message sending, and then the network connection of the foundation network port corresponding with received port information.
Compared with prior art, network port change in server, the embodiment of the present invention still can be after sending a request message to this server, receive and identify the port information of the network port corresponding to this request message of this server transmission, and foundation is connected with the network port network corresponding to this port information.
Corresponding to the embodiment of the method shown in Fig. 1, the embodiment of the present invention also provides a kind of device that network connects of setting up.
As shown in Figure 8, a kind of device of setting up network connection that the embodiment of the present invention provides, is applied to server, and described server comprises a plurality of network ports, and this device can comprise:
Message acquisition module 801, the request message sending for obtaining client, the request message that described client sends carries the communication mode information that this client and described server communicate;
The first information obtains module 802, for according to the corresponding relation of the network port of default communication mode information and described server, obtain the port information of the network port of the communication mode information in the request message obtaining corresponding to described message acquisition module 801;
First information sending module 803, sends to described client for the described first information being obtained to the port information that module 802 obtains, so that described client is set up network with the network port of port information corresponding to this, is connected.
As can be seen here, the device of setting up network connection that the embodiment of the present invention provides, after obtaining the request message of client transmission, can be according to default communication mode information and the corresponding relation of the network port in server, determine the port information corresponding to the network port of the communication mode information in described request message, and determined port information is sent to described client so that described client with corresponding to the network port of this port information, set up network and be connected.
Compared with prior art, network port change in server, the request message that the embodiment of the present invention still can send according to this client, determines the port information corresponding to the network port of this request message, then this port information is sent to client, so that both set up network, connect.
Optionally, in one embodiment of the invention, the first information as shown in Figure 9 obtains module 802, can comprise:
Port is determined submodule 802a, for according to the corresponding relation of the network port of default communication mode information and described server, determines the network port of the communication mode information in the request message obtaining corresponding to described message acquisition module 801;
Information acquisition submodule 802b, determines the port information of the network port of the determined network port of submodule 802a in idle condition for obtaining described port.
Optionally, in one embodiment of the invention, a plurality of network ports that described server comprises all carry type identification; The device of setting up network connection that the embodiment of the present invention provides can also on the basis of Fig. 8 shown device, increase duration statistical module 804 and port number increases module 805.
It should be noted that, duration statistical module 804 increases module 805 with port number and both can be connected according to the connected mode of Figure 10 shown device, also can connect according to other connected mode, and the embodiment of the present invention is not construed as limiting this.Below the function of duration statistical module 804 and port number increase module 805 is described in detail.
Duration statistical module 804, for adding up the in running order duration of all types of network ports in the first default duration;
Port number increases module 805, and for increasing the port number of the network port of target type, described target type is that work duration surpasses the port type under the network port of the first predetermined threshold value.
Optionally, in one embodiment of the invention, the embodiment of the present invention provides sets up device that network connects can also on the basis of Fig. 8 shown device, accelerate statistical module 806 and the first output module 807.
It should be noted that, quantity statistics module 806 both can be connected according to the connected mode of Figure 11 shown device with the first output module 807, also can connect according to other connected mode, and the embodiment of the present invention is not construed as limiting this.Below the function of quantity statistical module 806 and the first output module 807 is described in detail.
Quantity statistics module 806, for adding up the quantity of the in running order network port;
The first output module 807, outputs to display device for the quantitative value that described quantity statistics module 806 statistics are obtained, so that user can monitor the port service condition of server.
Optionally, in one embodiment of the invention, the device of setting up network connection that the embodiment of the present invention provides can also increase state information acquisition module 808 and the second output module 809 on the basis of Fig. 8 shown device.
It should be noted that, state information acquisition module 808 both can be connected according to the connected mode of Figure 12 shown device with the second output module 809, also can connect according to other connected mode, and the embodiment of the present invention is not construed as limiting this.Below the function of state information acquisition module 808 and the second output module 809 is described in detail.
State information acquisition module 808, for obtaining the state information of the network port;
The second output module 809, outputs to display device for the state information of the network port that described state information acquisition module 808 is got, so that the port working monitoring state that user can be to server.
Optionally, in one embodiment of the invention, the communication mode of described client and described server is long connected mode or short connected mode; When the communication mode of described client and described server is long connected mode, the device of setting up network connection that the embodiment of the present invention provides can also increase monitoring modular 810, mark module 811, the second information acquisition modules 812 and the second information sending module 813 on the basis of Fig. 8 shown device.
It should be noted that, monitoring modular 810, mark module 811, the second information acquisition module 812 both can be connected according to the connected mode of Figure 13 shown device with the second information sending module 813, also can connect according to other connected mode, and the embodiment of the present invention is not construed as limiting this.Below the function of monitoring modular 810, mark module 811, the second information acquisition modules 812 and the second information sending module 813 is described in detail.
Monitoring modular 810, is connected disconnection times for monitoring described client in the second default duration with the network between the network port;
Mark module 811, the network port that reaches the second predetermined threshold value for the disconnection times that described monitoring modular 810 is monitored is labeled as fault;
The second information acquisition module 812, for determine described server corresponding to the current communication mode of described client, unmarked be the network port of fault, obtain the port information of a network port in the determined network port;
The second information sending module 813, sends to described client for the port information that described the second information acquisition module 812 is obtained so that described client with corresponding to the network port of this port information, set up network and be connected.
Corresponding to the embodiment of the method shown in Fig. 7, the embodiment of the present invention also provides a kind of device that network connects of setting up.
As shown in figure 14, a kind of device of setting up network connection that the embodiment of the present invention provides, is applied to client, and this device can comprise:
Message transmission module 1401, for sending a request message to server, described request message carries the communication mode information that described client and this server communicate;
Information receiving module 1402, for receiving described server after obtaining the request message that described message transmission module 1401 sends, the port information of the network port corresponding to this communication mode information of transmission; In described server, store default communication mode information and the corresponding relation of the network port in described server;
Network connects sets up module 1403, for setting up the network of the network port that the port information received with described information receiving module 1402 is corresponding, connects.
As can be seen here, the device of setting up network connection that the embodiment of the present invention provides, can send the request message that carries communication mode information to server, and receive described server after obtaining described request message, the port information of the network port corresponding to the communication mode information in this request message sending, and then the network connection of the foundation network port corresponding with received port information.
Compared with prior art, network port change in server, the embodiment of the present invention still can be after sending a request message to this server, receive and identify the port information of the network port corresponding to this request message of this server transmission, and foundation is connected with the network port network corresponding to this port information.
For device embodiment, because it is substantially similar in appearance to embodiment of the method, so description is fairly simple, relevant part is referring to the part explanation of embodiment of the method.
While for convenience of description, describing above device, with function, being divided into various modules describes respectively.Certainly, when enforcement is of the present invention, the function of each module can be realized in same or a plurality of software and/or hardware.
It should be noted that, in this article, relational terms such as the first and second grades is only used for an entity or operation to separate with another entity or operating space, and not necessarily requires or imply and between these entities or operation, have the relation of any this reality or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby the process, method, article or the equipment that make to comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or be also included as the intrinsic key element of this process, method, article or equipment.The in the situation that of more restrictions not, the key element being limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
Each embodiment in this specification all adopts relevant mode to describe, between each embodiment identical similar part mutually referring to, each embodiment stresses is the difference with other embodiment.Especially, for device embodiment, because it is substantially similar in appearance to embodiment of the method, so description is fairly simple, relevant part is referring to the part explanation of embodiment of the method.
One of ordinary skill in the art will appreciate that all or part of step realizing in said method execution mode is to come the hardware that instruction is relevant to complete by program, described program can be stored in computer read/write memory medium, here alleged storage medium, as: ROM/RAM, magnetic disc, CD etc.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All any modifications of doing within the spirit and principles in the present invention, be equal to replacement, improvement etc., be all included in protection scope of the present invention.