问题
We all know that there's a big sweet piece o' binary named http.sys kernel-mode driver in our Windows that does HTTP handling for us. That is basically all we know about it.
But today I thought: hey, all our networking stuff like TCP/IP and whatnot is here, in userland -- ws2_32.dll's providers (in mswsock.dll) and all its friends. Since there are userland components, there is no way http.sys uses them. The question is: how do they do it? Any informative links will be greatly appreciated.
回答1:
I would imagine that HTTP.SYS utilizes Windows Kernel Sockets to achieve it's objectives. See here as well.
回答2:
http.sys
is only meant to be used as server component listening for HTTP/HTTPS requests - basically IIS depends on it to achieve good performance. It is not used to make any client requests using Winsock library. You can read more here.
回答3:
Found a good answer to the question here: http://www.codemachine.com/article_tdi.html
It appears that there is much, much more to networking in Windows than Winsock shows us.
来源:https://stackoverflow.com/questions/13895542/http-sys-implementation