CNode

请问下node.js 在使用 socket.io 接收数据时有没有长度限制?

Cchzhewl发布于13 年前最后回复13 年前2 回复5476 浏览0 收藏

请问下node.js 在使用 socket.io 接收数据时有没有长度限制? 如果没有,由于客户端大量发送大数据包时(比如恶意攻击),会不会阻塞node.js 事件队列,影响正常服务?

查看回复

回复 (2)

L
leizongmin#1·13 年前

看了一下socket.io的wiki,有这么一项:

destroy buffer size defaults to 10E7

Used by the HTTP transports. The Socket.IO server buffers HTTP request bodies up to this limit. This limit is not applied to websocket or flashsockets.

参考:https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO

C
chzhewl#2·13 年前
引用 leizongmin看了一下socket.io的wiki,有这么一项: destroy buffer size defaults to 10E7 Used by the HTTP transports. The ...

谢谢! "This limit is not applied to websocket or flashsockets." 这个限制好像也只局限于http 方式的传输, websocket 好像没这个限制.

参与回复
登录后即可参与回复。登录