问题描述
正如我们所有人都知道的那样,websocket维护服务器和客户端之间的打开连接以实现服务器推送,而不像服务器拉动那样连接不会保持打开状态。我的问题是一次可以打开多少个TCP连接?在这方面服务器推送与服务器提取的限制是什么?
As all of us might know, websocket maintains opened connection between server and client to achieve server push not like server pull where the connection wouldn't remains open. My question is how many number of TCP connections can be open at one time? What is the limitation of server push compared to server pull in this regard?
推荐答案
FireFox中允许的默认最大websocket连接数是200.
资料来源:
Default maximum number of websocket connections allowed in FireFox is 200.Source: https://developer.mozilla.org/en/docs/WebSockets#Gecko_7.0
来自似乎谈论的是动态数字,普通套接字池最小为6,websocket池为30。
更多信息:
From the comment given in line #48 of http://src.chromium.org/viewvc/chrome/trunk/src/net/socket/client_socket_pool_manager.cc?r1=128044&r2=128043&pathrev=128044 seems to talk of dynamic numbers with minimum of 6 for normal socket pool and 30 for websocket pool.More Info: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-reviews/4sHNK-Eotn0
这篇关于使用websocket的最大连接数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!