mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: info websocket buffer size limit increased
parent
168651b6f2
commit
f0984dc128
|
@ -22,19 +22,27 @@ import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.web.socket.config.annotation.EnableWebSocket;
|
import org.springframework.web.socket.config.annotation.EnableWebSocket;
|
||||||
import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
|
import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
|
||||||
import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;
|
import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;
|
||||||
|
import org.springframework.web.socket.server.standard.ServletServerContainerFactoryBean;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableWebSocket
|
@EnableWebSocket
|
||||||
public class InfoSocketConfig implements WebSocketConfigurer {
|
public class InfoSocketConfig implements WebSocketConfigurer {
|
||||||
|
|
||||||
@Override
|
|
||||||
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
|
|
||||||
registry.addHandler(infoHandler(), "/info").setAllowedOrigins("*");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
@Override
|
||||||
public InfoHandler infoHandler() {
|
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
|
||||||
return new InfoHandler();
|
registry.addHandler(infoHandler(), "/info").setAllowedOrigins("*");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public InfoHandler infoHandler() {
|
||||||
|
return new InfoHandler();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public ServletServerContainerFactoryBean createWebSocketContainer() {
|
||||||
|
ServletServerContainerFactoryBean container = new ServletServerContainerFactoryBean();
|
||||||
|
container.setMaxTextMessageBufferSize(50 * 1024);
|
||||||
|
return container;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue