简体   繁体   中英

Socket.io-netty and socket.io v0.7 - forbidden

I'm using this lib https://github.com/ibdknox/socket.io-netty . And with new socket.io catch error with this line . Looks like socket io doesn't send required headers(WEBSOCKET_PATH 137 line, FLASHSOCKET_PATH 139 line) and location was null. How do I see, browser trying to get url http://127.0.0.1:8080/socket.io/1/?t=1331464323415&jsonp=0 and doesn't send any needed headers - here headers that were sent.

What do I need to fix the problem? I can't understand -_-

This is javascript clientside code:

var chat = io.connect('http://127.0.0.1:8080')

      chat.on('connect', function () {
        chat.emit('hi!');
      });

Socket.io-Netty does not support socket.io protocol higher than . socket.io协议。 You can try to use another implementation of socket.io server - https://github.com/mrniko/netty-socketio . It supports latest protocol of socket.io.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM