IM software client, using the state machine to maintain the login status, im Client
For example, IM software such as QQ and Feixin maintains a link with the Server and identifies the status of the client. Are you logged on, logged on, or logged out.
The following State Machine allows the IM software to maintain the logon status.
Steps for each status:
1. Start Logon (similar to logout)
2. logging on. Trigger condition: manual logon, network availability notification
3. logon successful
4. Logon Failed. There are multiple possible causes: Network
5. After the password is changed, log on locally or use the old password to log out.
6. Disconnection due to network problems
7. log out manually or passively and be kicked out.
All of the above are summarized in the personal development process. If there are any errors, please correct them!