+ -
当前位置:首页 → 问答吧 → 可以用UPD协义获取网页吗?

可以用UPD协义获取网页吗?

时间:2011-12-06

来源:互联网

很多关于爬虫的文章里都有说到用UDP取代TCP 来获取网页可以提高效率。可是我又看到一些别的文章里说HTTP不支持UDP协义
请高手们解答呀

作者: xtmhm147   发布时间: 2011-12-06

没人理我呀

作者: xtmhm147   发布时间: 2011-12-06

你可以先明白一下tcp和udp的区别 。这样可以对你有帮助

作者: woaizuguo   发布时间: 2011-12-06

可以啊,可以结贴了

作者: chenandczh   发布时间: 2011-12-06

http不是在TCP之上的协议吗?

作者: findcaiyzh   发布时间: 2011-12-06

这个还真不知道,你给网站发送UDP信息,然后网站给你回UDP信息?

作者: charles_y   发布时间: 2011-12-06

看起来http协议没有指定底层必须使用是么传输协议,只是要求可靠的传输。

****************************************************************
From RFC 2616:

HTTP communication usually takes place over TCP/IP connections. The default port is TCP 80, but other ports can be used. This does not preclude HTTP from being implemented on top of any other protocol on the Internet, or on other networks. HTTP only presumes a reliable transport; any protocol that provides such guarantees can be used; the mapping of the HTTP/1.1 request and response structures onto the transport data units of the protocol in question is outside the scope of this specification.

So although it doesn't explicitly say so, UDP is not used because it is not a "reliable transport".
****************************************************************
上述来自
http://stackoverflow.com/questions/323351/does-http-use-udp

问题是你给web server发一个udp消息,web server会理吗?

作者: findcaiyzh   发布时间: 2011-12-06

IIS6站点属性中端口前面的Label是TCP Port.

作者: findcaiyzh   发布时间: 2011-12-06

1 楼主你想要做什么??
2 楼主你了解HTTP协议么,你不了解至少应该知道Http是基于TCP协议的吧?
3 UDP抓取WEB页面.不大可能.IIS就是基于TCP的.你UDP怎么去抓?

作者: wukaiping870123   发布时间: 2011-12-06

引用 2 楼 woaizuguo 的回复:

你可以先明白一下tcp和udp的区别 。这样可以对你有帮助


要如何弄呢?

作者: xtmhm147   发布时间: 2011-12-06

引用 6 楼 findcaiyzh 的回复:

看起来http协议没有指定底层必须使用是么传输协议,只是要求可靠的传输。

****************************************************************
From RFC 2616:

HTTP communication usually takes place over TCP/IP connections. The default……


不知如何弄才好?

作者: xtmhm147   发布时间: 2011-12-06