networking project 1
2016-11-05 13:31:25 0 举报
bababa
作者其他创作
大纲/内容
send whole reply to client
add the new reply to cache
send the data stored in the cache directly
YES
NO
accept client Socket;create input and output stream
establish httpsSSLConnection connection
check url to see if requested data is already in the cache
myProxy extends Thread
check url to see if it is a https request
create connection to real server;send GET request;read in reply from the real server to client
check if it is a GET request
create connection to real server;send conditional GET request;read in reply from the real server
read in client request in to buffer with a loop;extract host name-IP address
create serverSocket
check if reply contains \"304\" - no content
run()
0 条评论
下一页