今天遇到非常不理解问题,WebSocket 发送消息,不成功,分析之后,发现WebSocket 的消息体的大小限制,可以修改Play的配置来修改该配制
WebSocket 消息大小限制:
play.websocket.buffer.limit
与此相同的还有:
HTTP 解析最大内存限制:
play.http.parser.maxMemoryBuffer
HTTP 磁盘文件最大限制:
play.http.parser.maxDiskBuffer
附加Akka 配额:
netty.tcp {
hostname = "127.0.0.1"
port = 2552
# Sets the send buffer size of the Sockets,
# set to 0b for platform default
send-buffer-size = 32768k
# Sets the receive buffer size of the Sockets,
# set to 0b for platform default
receive-buffer-size = 32768k
# Maximum message size the transport will accept, but at least
# 32000 bytes.
# Please note that UDP does not support arbitrary large datagrams,
# so this setting has to be chosen carefully when using UDP.
# Both send-buffer-size and receive-buffer-size settings has to
# be adjusted to be able to buffer messages of maximum size.
maximum-frame-size = 16384k
}
Connection reset by peer的常见原因 : http://blog.sina.com.cn/s/blog_43eb83b90102dseg.html