ASF Bugzilla – Attachment 36010 Details for
Bug 62523
Concurrent stress test websocket server by jmeter, occur:java.io.IOException: java.io.IOException: Broken pipe
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
websocket config
WebSocketConfig.java (text/plain), 1.64 KB, created by
sosojustdo
on 2018-07-05 10:46:07 UTC
(
hide
)
Description:
websocket config
Filename:
MIME Type:
Creator:
sosojustdo
Created:
2018-07-05 10:46:07 UTC
Size:
1.64 KB
patch
obsolete
>package com.cloudyoung.wx.comet.server; > >import org.apache.logging.log4j.LogManager; >import org.apache.logging.log4j.Logger; >import org.springframework.context.annotation.Bean; >import org.springframework.context.annotation.Configuration; >import org.springframework.web.servlet.config.annotation.EnableWebMvc; >import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; >import org.springframework.web.socket.WebSocketHandler; >import org.springframework.web.socket.config.annotation.EnableWebSocket; >import org.springframework.web.socket.config.annotation.WebSocketConfigurer; >import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry; > >/** > * @Description 项ç®å¯å¨é ç½®websocketæå¡ > * @date 2018å¹´3æ7æ¥ä¸å9:01:27 > * @version V1.0 > * @author é¹ç«å¼º (zoulq@cloud-young.com) > * <p>Copyright (c) Department of Research and Development/Beijing.</p> > */ >@Configuration >@EnableWebMvc >@EnableWebSocket >public class WebSocketConfig extends WebMvcConfigurerAdapter implements WebSocketConfigurer { > private static final Logger logger = LogManager.getLogger(WebSocketConfig.class); > > @Override > public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { > logger.info("注åwebSocketå°åå¼å§"); > registry.addHandler(systemWebSocketHandler(), "/webSocketServer").addInterceptors(handshake()); > } > > @Bean > public WebSocketHandler systemWebSocketHandler() { > return new SystemWebSocketHandler(); > } > > @Bean > public WebSocketHandshakeInterceptor handshake() { > return new WebSocketHandshakeInterceptor(); > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 62523
:
36008
|
36009
| 36010 |
36011