Http, socket tcp/ip

本文深入解析了TCP/IP协议栈的七层模型,详细介绍了HTTP、HTTP连接、Socket的基本概念与操作流程,以及Socket与TCP连接的区别,并讨论了在实际传输中支持UDP的能力。此外,文章还概述了与Socket相关的术语,如请求、响应、资源等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://www.360doc.com/content/11/0421/17/4154133_111328225.shtml


OSI has 7 layers  application,presentation,session,transportation,network,data link and physical layer.

The last three is more related to network engineering,named as media layer, the rest of it costs more concern on users, named as host layer.

http protocol:  application.(others like ftp,telnet)

tcp protocol: transportation.

ip protocol: network.


socket is the encapsulation of the tcp/ip protocol, but an API,through it, we can use tcp/ip.

1. tcp connection(through 3 times handshaking)

a. client --syn--server, status: SYN_SEND.

b. server get syn, ack client SYN, server--(syn+ack)--client, status:SYN_RECV

c. client get (syn+ack), client--ack--server, status:ESTABLISHED

after this the data begin transportation. To terminate needs 4 times handshaking.


2.http connection

Http is an application that is based on the TCP.

        It's a short and allowed overlapped connection.


3.socket

a.basic operation unit. including five essential elements: the ip and port number of the client and server. as well as protocol.

b.the procedure. imagine through 1.a


4.socket and tcp connection.

what make the difference, in the actual transportation,socket can support UDP.


5

a.connection.

b.message.

c.request.

d.response

e.resource

f.entity

g.client

h.user agent

i.server

j.origin server

k.proxy

l.gateway

m.tunnel

n.cache


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值