zoukankan      html  css  js  c++  java
  • Play Framework WebSocket 问题

      今天遇到非常不理解问题,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

  • 相关阅读:
    MapReduce Shuffle 和 Spark Shuffle 原理概述
    Kafka生产消费API JAVA实现
    Kylin引入Spark引擎
    CentOS 下安装 Cmake 步骤
    TP5 使用验证码功能
    连接树莓派中的MySQL服务器
    用 PHP 函数变量数组改变代码结构
    表的优化
    Wamp 下运行 CGI 笔记
    PHP 中的关于 trait 的简单
  • 原文地址:https://www.cnblogs.com/yunfeiqi/p/6656695.html
Copyright © 2011-2022 走看看