Zou Guo Yan

Results 3 comments of Zou Guo Yan

非常感谢您的回复. 但是我看代码的 WebSocketServerHandshakerFactory wsFactory = new WebSocketServerHandshakerFactory(getWebSocketLocation(req), subprotocols, true, this.config.getmaxFramePayloadLength()); private static String getWebSocketLocation(FullHttpRequest req) { String location = req.headers().get(HttpHeaderNames.HOST) + req.uri(); return "ws://" + location; } 所有websocket handshake的地方都用到这个代码的,那wss请求走的代码是哪里呢? 还有如果要支持请求参数,是哪个版本可以支持的啊?

可能我的版本不对,我现在用的是0.11.0版本,我的83行是括号,可以帮忙贴下代码吗? 还有个问题 @OnMessage public void onMessage(Session session, String message,@PathVariable(name = "arg") String arg) { log.info("msg is {}",message); session.sendText("Hello Netty!"); } 我代码里面写成这样,onOpen方法里面可以获取到path = "/webSocket/{123}"里面的123,但是onMessage方法里面获取不到 session = {Session@9507} message = "{"msg":"zzz,let me...

明白了,谢谢。还请教下,现在的websocket每隔1分钟就断开链接了,这个是您提供的框架问题,还是什么问题?