#+BEGIN_SRC plantuml :file images/tcp_connect.png title TCP连接建立 autonumber participant client participant server note over client , server client与server初始状态都处于CLOSED end note client -> server : SYN(SEQ=x) activate client note left: 3次握手的第1步,\n此后client处于SYN_SENT状态 client <-- server : SYN(SEQ=y,ACK=x+1) activate server note right: 3次握手的第2步,\n此后server处于SYN_RCVD状态 client -> server : (SEQ=x+1,ACK=y+1) deactivate client deactivate server note left of client: 3次握手的第3步,\nclient确认server的SYN,\n并处于ESTABLISHED状态 note right of server: server的SYN被client确认后,\nserver也进入ESTABLISHED状态 note over client , server 3次握手结束,client与server都进入ESTABLISHED状态 从现在开始双方可以传输数据了 end note #+END_SRC
本文出自 “天道酬勤” 博客,请务必保留此出处http://lavenliu.blog.51cto.com/5060944/1637216
原文地址:http://lavenliu.blog.51cto.com/5060944/1637216