Spring Websockets缓冲区大小限制

时间:2018-10-25 07:14:42

标签: spring tomcat websocket

在Spring Websockets中,在传输注册和servlet容器上设置缓冲区大小有什么区别?

WebSocketTransportRegistration.setSendBufferSizeLimitServletServerContainerFactoryBean.setMaxTextMessageBufferSize

ServletServerContainerFactoryBean container = new ServletServerContainerFactoryBean();
container.setMaxTextMessageBufferSize(websocketBuffer);

public void configureWebSocketTransport(WebSocketTransportRegistration reg) {
        reg.setMessageSizeLimit(sessionBuffer);
        reg.setSendBufferSizeLimit(sessionBuffer);
}

0 个答案:

没有答案