⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.txt

📁 SSD8的练习一答案
💻 TXT
字号:
                                              Readme for Exercise 1 of SSD 8 
Here are the instructions on compiling and running each program: 
(1)Client.java 
   First, compile this java file through cmd: javac Client.java to Client.class.
   Second, run this class file also through cmd: java Client <the address of web server>
   Then you can see the guide for input the request if the connection is OK. Now, input the request. For example: GET / HTTP/1.0
Then the web information will be displayed on the screen and the program will remind you to save the web file. At last, input the file name which you want to save. 
   Note: If you don't input the address of web server, the program will input an error message on the screen. 
  
(2)Server.java 
     First, compile this java file through cmd: javac Server.java to Server.class. 
     Second, run this class file also through cmd: java Server
     Now the server is waiting for request from clients. When a client connected with it, it will display some conditions about the connection on the screen. 
     Note: This server could only respond the GET method request. If you use put method, the screen will just display the file name you want. And the connection will be closed if a request is not having a right format. For example, wrong method, wrong filename format or non-existed filename, etc. 
  
(3)ThreadedServer.java 
    First, compile this java file through cmd: javac ThreadedServer.java to ThreadedServer.class. 
    Second, run this class file also through cmd: java ThreadedServer
Now the server is waiting for request from clients. When clients connecting with it, it will display the count of clients and the other conditions about the connection on the screen. 
    Note: This server could only respond the GET method request. If you use put method, the screen will just display the file name you want. And the connection will be closed if a request is not having a right format.  For example, wrong method, wrong filename format or non-existed filename, etc.  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -