Under a kind of mobile environment, process the method for automatic repeat logon
Technical field
The present invention relates to the network entry field under mobile environment, particularly the user login method on mobile device.
Background technology
In instantaneous communication system, often can run into because the situation that some because users is kicked off, if this time, user reacted not in time, may delay the sending and receiving of message.Whether current modal a solution is: when user is kicked off, server can send message to client, and client points out user to go offline after receiving message, then allow user select to connect.Although this scheme has also solved the problem automatically logging in, if user cannot react for the moment in time, can incur loss through delay the reception of message in the same old way, so strict upper, this scheme has only solved a part for problem.
By retrieval, find, the patent No. is 200810103832.0, and name is called a kind of method that processing repeats to log in.This patent is in order to solve user's access of instant communicating system, run into while repeating to log in, system is simply kicked original online user off and is allowed this user log in to reach the standard grade, or system directly stops this user to log in the problem of reaching the standard grade, a kind of method that provides processing to repeat to log in, comprises step: it is online that server detects the user name of user input; Server sends message to client, and this account of prompting user is online; Client is received after message, points out user to make one's options.This method can guarantee to have a user to login online, prevents the generation of steal-number, also can give the chance of a selection of login user simultaneously.
Although this patent is all to solve the problem that repeats to log in, and needs manually to realize and repeat to log in.
Summary of the invention
For the deficiencies in the prior art, the invention provides a kind of automatic repeat logon method of processing, the object of the invention is to keep the long of user to connect, avoid user because some reason cannot be found after being kicked off in time, be forced to manual connection, the problem that causes information to receive in time.User only need to once log in, and can keep always online, unless suspension or user exit application automatically, even if user is busy with other thing, does not also delay the reception of information in instantaneous communication system.
To achieve these goals, the technical solution used in the present invention is:
Under process an automatic repeat logon method, comprise the steps: that client sends the instruction of a current long connection status of inquiry at set intervals to server:
If current long connection status is for connecting, this connects end;
If current long connection status is not for connecting, server carries out attended operation.
Above-mentioned attended operation action, if connect unsuccessfully, user's connection status of server end is disconnected, this connects and finishes; If successful connection, user's connection status of server end is for connecting, and this connects end.
Beneficial effect of the present invention: whether client just detects at set intervals user and connect, just reconnects if gone offline, until user initiatively exits this application or network interrupts, otherwise can keep user online always.
Accompanying drawing explanation
Fig. 1, functional-block diagram of the present invention.
Embodiment
Whole functional-block diagram as of the present invention in Fig. 1; Under a kind of mobile environment, process automatic repeat logon method, comprise the steps: that client sends the instruction (the long state connecting of judgement at set intervals) of a current long connection status of inquiry at set intervals to server, if current long connection status is for connecting, this connects end; If current long connection status is not for connecting (attempting connecting), server carries out attended operation.Above-mentioned attended operation action, if connect unsuccessfully, user's connection status of server end is disconnected, this connects and finishes; If successful connection, user's connection status of server end is for connecting, and this connects end.
Beneficial effect of the present invention: whether client just detects at set intervals user and connect, just reconnects if gone offline, until user initiatively exits this application or network interrupts, otherwise can keep user online always.The present invention is the in the situation that of user's the unknown, automatically logs in, and keeps user always online; Client automatically detects and logs in state at set intervals, if be kicked off, automatically logs in.