Java Code Examples for org.springframework.web.socket.server.standard.ServletServerContainerFactoryBean#setMaxBinaryMessageBufferSize()

The following examples show how to use org.springframework.web.socket.server.standard.ServletServerContainerFactoryBean#setMaxBinaryMessageBufferSize() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WebSocketConfig.java    From WeEvent with Apache License 2.0 5 votes vote down vote up
@Bean
public ServletServerContainerFactoryBean createWebSocketContainer() {
    ServletServerContainerFactoryBean container = new ServletServerContainerFactoryBean();
    container.setMaxTextMessageBufferSize(maxSize);
    container.setMaxBinaryMessageBufferSize(maxSize);
    return container;
}
 
Example 2
Source File: BootStrap.java    From MyBlog with Apache License 2.0 5 votes vote down vote up
/*********************************************************************************************************/
//WebSocketConfigurer配置
@Bean
public ServletServerContainerFactoryBean createWebSocketContainer() {
    ServletServerContainerFactoryBean container = new ServletServerContainerFactoryBean();
    container.setMaxTextMessageBufferSize(1024 * 1024 * 10);
    container.setMaxBinaryMessageBufferSize(1024 * 1024 * 10);
    return container;
}
 
Example 3
Source File: WebSocketConfiguration.java    From iotplatform with Apache License 2.0 5 votes vote down vote up
@Bean
public ServletServerContainerFactoryBean createWebSocketContainer() {
  ServletServerContainerFactoryBean container = new ServletServerContainerFactoryBean();
  container.setMaxTextMessageBufferSize(8192);
  container.setMaxBinaryMessageBufferSize(8192);
  return container;
}
 
Example 4
Source File: KurentoRoomServerApp.java    From kurento-room with Apache License 2.0 5 votes vote down vote up
@Bean
public ServletServerContainerFactoryBean createWebSocketContainer() {
  ServletServerContainerFactoryBean container = new ServletServerContainerFactoryBean();
  container.setMaxTextMessageBufferSize(1000000); // chars
  container.setMaxBinaryMessageBufferSize(1000000); // bytes
  return container;
}
 
Example 5
Source File: BootTestApplication.java    From kurento-java with Apache License 2.0 5 votes vote down vote up
@Bean
public ServletServerContainerFactoryBean createWebSocketContainer() {
  ServletServerContainerFactoryBean container = new ServletServerContainerFactoryBean();
  container.setMaxSessionIdleTimeout((long)10000);
  container.setMaxTextMessageBufferSize(1000000);
  container.setMaxBinaryMessageBufferSize(1000000);
  return container;
}
 
Example 6
Source File: WebSocketConfig.java    From bearchoke with Apache License 2.0 5 votes vote down vote up
/**
 * For serving up websockets in a Tomcat / GlassFish / WildFly environment
 *
 * @return
 */
@Bean
public ServletServerContainerFactoryBean createWebSocketContainer() {
    ServletServerContainerFactoryBean container = new ServletServerContainerFactoryBean();
    container.setMaxTextMessageBufferSize(8192);
    container.setMaxBinaryMessageBufferSize(8192);
    return container;
}
 
Example 7
Source File: WebSocketConfig.java    From devicehive-java-server with Apache License 2.0 5 votes vote down vote up
@Bean
public ServletServerContainerFactoryBean createWebSocketContainer() {
    ServletServerContainerFactoryBean container = new ServletServerContainerFactoryBean();
    container.setMaxBinaryMessageBufferSize(Constants.WEBSOCKET_MAX_BUFFER_SIZE);
    container.setMaxTextMessageBufferSize(Constants.WEBSOCKET_MAX_BUFFER_SIZE);
    container.setMaxSessionIdleTimeout(Constants.WEBSOCKET_TIMEOUT);
    return container;
}