您的位置:首页 > 理论基础 > 计算机网络

TCP Three-Way handshake

2015-07-02 17:05 302 查看
initialize TCP variables:

sequence numbers

buffers,flow control info

Client: connection initiator

Socket clientSocket = new Socket("hostname","portnumber");

Server: contacted by client

Socket connectionSocket = welcomeScoket.accept();

Three-Way handshake:

step1: Client sends TCP
SYN segment to server

specifies initial seqnum = x

no data

step2: server receives SYN replies with
SYN/ACK segment

server allocates buffers

specifies server initial seq =y

acknowledgement = x+1

step3: client receives SYN/ACK replies with ACK
segment .which my contain data

acknowledgement = y+1
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: