We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
书的最后一章构建多线程服务器代码,测试发现浏览器第一连接发起请求,TcpListener会认为收到两个请求,发出两个消息,会有两个线程收到消息开始工作,只不过第二个因为没有实际的请求会阻塞到job那里,这时候在用浏览器发起一次请求,阻塞的那个线程才会实际开始工作,这是为什么啊?
The text was updated successfully, but these errors were encountered:
是不是浏览器发了俩请求?你直接 curl 试试?我看浏览器还会多请求一个 favicon
Sorry, something went wrong.
用curl请求打印是正常的,看来是浏览器的请求比较复杂,另外问一下是怎么看到请求favicon的,我F12看network那里没看到这个。我试了先浏览器请求第一下,然后用curl请求第二下,curl无法建立连接,看来浏览器第一下是个类似长连接的,导致其他程序无法建立连接
就是 F12,有时(感觉是新 tab 第一次)会出现,按 F5 就没有了。
正常的,浏览器请求网站的时候,会默认发起网站图标的请求,路劲是/favicon.ico
No branches or pull requests
书的最后一章构建多线程服务器代码,测试发现浏览器第一连接发起请求,TcpListener会认为收到两个请求,发出两个消息,会有两个线程收到消息开始工作,只不过第二个因为没有实际的请求会阻塞到job那里,这时候在用浏览器发起一次请求,阻塞的那个线程才会实际开始工作,这是为什么啊?
The text was updated successfully, but these errors were encountered: