开发者社区 问答 正文

netty往ios推送信息的问题?报错

netty和ios进行信息推送,通过websocket,目前可以推送到苹果手机上了,但是查看服务端日志,总是报这个错误,另外,我用netty4.0.23版本,请求帮助

错误信息

 An exception was thrown by a user handler's exceptionCaught() method while handling the following exception:
io.netty.handler.codec.http.websocketx.WebSocketHandshakeException: not a WebSocket handshake request: missing upgrade

报错代码位置在标红处:

WebSocketServerHandshakerFactory wsFactory = new WebSocketServerHandshakerFactory(
                getWebSocketLocation(req), null, false);
        handshaker = wsFactory.newHandshaker(req);
        if (handshaker == null) {
            WebSocketServerHandshakerFactory.sendUnsupportedWebSocketVersionResponse(ctx.channel());
        } else {
             handshaker.handshake(ctx.channel(), req);
        }

 

展开
收起
爱吃鱼的程序员 2020-06-14 20:31:47 591 分享
分享
版权
举报
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    没人回答问题呀有人遇到过吗?请教下哦握手我使用WebSocketServerProtocolHandler这个Handler处理的。<divclass='ref'>

    引用来自“catch23”的评论

    握手我使用WebSocketServerProtocolHandler这个Handler处理的。<divclass='ref'><divclass='ref'>

    引用来自“catch23”的评论

    握手我使用WebSocketServerProtocolHandler这个Handler处理的。<divclass='ref'><divclass='ref'><divclass='ref'>

    引用来自“catch23”的评论

    握手我使用WebSocketServerProtocolHandler这个Handler处理的。兄弟,这个问题你最终解决了吗?去帮助

    2020-06-14 20:32:04 举报
    赞同 评论

    评论

    全部评论 (0)

    登录后可评论