readme.txt
来自「HTTP/1.0 Client HTTP/1.0 Server」· 文本 代码 · 共 21 行
TXT
21 行
1.Class Client
- First you must enter argument, the argument should be a host name or ip address. For example "www.baidu.com".
- Then you can enter your request,such as "GET / HTTP/1.0". So you can get information from the server.
- At last,you should enter a name of file,such as "index.html". The file is used to save the content of the response from server.And then the content be saved to the file.
2.Class Server
- The server is listening to 8000 port.
- You should enter the server's root, such as "c:\\".
- If you want to get the file "c:\index.html", you should enter "http://localhost:8000/index.html" in the browser.
- If you want to access the files in a subfold of "c:\www", for instance, "C:\temp\sunset.jpg", you should enter "http://localhost:8000/temp/sunset.jpg".
3.About ThreadedServer.java
You can do it follow the Server.java, but the ThreadedServer.java can serve more than one user.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?