Description: Implementation of Telnet server:
1. After the client through a Telnet connection, the server returns some of the information system (his definition, at least should include the author's student id), the prompt will be displayed after "login:" prompt the user for a user name to log in
2. Require verification of user name and password. The user name and password are all three. If the user name and password error return invalid user or passwd and prompt to re-enter
3. The server side supports at least the following command (command does not take parameters)
Author: returns information about the program author
Date: back to the server's current date, the date format itself, but in the help
Time: the current time to return the server, the format of the time itself is defined, but explained in help
Help: returns the command supported by the server
Bye: disconnect from the server
If an unsupported command is entered, the corresponding prompt should be returned, such as prompting the user to type help to view the corresponding command
Tip: the server side has a buffer that receives the input character of the client, and receives each character one by one; When the return key is found, the command to execute the received character is executed. In addition, Telnet. Exe is the program that comes with Windows
The design requirements are as follows:
1. Use basic set interface functions for development, namely, using socket (), bind (), listen (), accept (), etc
2. No graphical interface is used, as long as the relevant information can be displayed in the text. In addition, the relevant information needs to be written to a log file (file name: xue_xue_txt).
Internal procedure instruction
File list (Check if you may need any files):