Created
April 12, 2014 21:41
-
-
Save Praseetha-KR/10558343 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IP | |
TCP | |
HTTP | |
brower -> www.google.com | |
-> DNS search for google.com return ip xxx.xxx.xxx.xxx | |
-> connect to xxx.xxx.xxx.xxx | |
-> GET / HTTP/1.0 | |
-> index.html with status code 200 ok | |
connect via http to xxx.xxx.xxx.xxx | |
-> connect via tcp to xxx.xxx.xxx.xxx:80 | |
-> connect via ip to xxx.xxx.xxx.xxx | |
connect via https to xxx.xxx.xxx.xxx | |
-> connect via tcp to xxx.xxx.xxx.xxx:443 | |
-> connect via ip to xxx.xxx.xxx.xxx | |
connect via ftp to xxx.xxx.xxx.xxx | |
-> connect via tcp to xxx.xxx.xxx.xxx:21 | |
-> connect via ip to xxx.xxx.xxx.xxx | |
server -> socket create, bind, listen > accept-| | |
client -> socket create, connect -----| -- send/recv | |
Server A | |
1. create socket s | |
2. bind s with ip | |
3. listen on s for data from clients | |
4. client A ip:port | |
5. server creates socket t | |
6. connect t to client A ip:port | |
7. to send data to client A, use t | |
8. recieve data from client A on t | |
9. listen on s, gives connection from client B ip:port | |
10. server creates socket u | |
11. connect u to client B ip:port | |
12. to send data to client B, use u | |
13. recieve data from client B on u | |
14. close socket u | |
15. listen on s, gives connection from client B ip:port | |
16. server creates socket v | |
17. connect v to client B ip:port | |
18. to send data to client B, use v | |
19. recieve data from client B on v | |
client A server | |
1 1 | |
1 2 | |
4 6 | |
client B server | |
4 4 | |
2 6 | |
5 11 | |
4 4 | |
6 10 | |
1 1, 0 | |
2, 0 3, 0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment