Closed sunng87 closed 10 years ago
could you send me a log trace? set logging level 'trace' for 'com.corundumstudio.socketio' package
Logs I can produce:
2014-07-03 18:32:11,905 INFO com.corundumstudio.socketio.SocketIOServer: Session store / pubsub factory used: MemoryStoreFactory (local session store only) 2014-07-03 18:32:11,905 INFO com.corundumstudio.socketio.SocketIOServer: SocketIO server started at port: 9494 2014-07-03 18:32:16,751 DEBUG com.corundumstudio.socketio.handler.AuthorizeHandler: Handshake authorized for sessionId: 0d69c376-4202-4706-80ad-e57898605d14 2014-07-03 18:32:16,751 DEBUG com.corundumstudio.socketio.handler.ClientHead: binding channel: [id: 0x8f855c41, /127.0.0.1:45901 => /127.0.0.1:9494] to transport: POLLING 2014-07-03 18:32:16,799 TRACE com.corundumstudio.socketio.handler.EncoderHandler: Out message: �0{"sid":"0d69c376-4202-4706-80ad-e57898605d14","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":60000} - sessionId: 0d69c376-4202-4706-80ad-e57898605d14
The server side ConnectListener is successfully triggered.
Tested locally using 1.0.6 client, with FF and Chrome - all works like a charm. Could you send me an browser log?
Wired, I'm using a node script like this:
var io = require('socket.io-client')
var socket = io('http://localhost:9494', {'transports': ['polling', 'websocket']});
socket.on('connect', function(){
console.log("connected");
socket.on('test', function(data){
console.log("received:", data);
socket.disconnect();
});
socket.on('disconnect', function(){
console.log("disconnected");
});
socket.emit("test", {name: "xiaoming"});
});
console.log("started");
Works with your script too
What about browser network log? From firebug or chrome dev.console
Checked wireshark netty-socketio actually sent response to client. So weird the nodejs doesn't respond. Will close this issue for now.
Have you tried nodejs server, is it behaves the same?
Yes, I tried that on nodejs server. I'm looking into nodejs code to see if there's any issue.
Compared with the original socketio server, I think it's because netty-socketio doesn't support b64=1
and always returns binary results.
I'll look into the client if it's possible to turn off b64=1
No way to disable b64=1
for CLI socket.io-client as it doesn't support XHR2. It would be great to support this extension but actually this isn't a bug. Thanks for you help in this thread and also the great library!!
does socketio nodejs client sends "b64=1" in http request or where?
how do you run CLI socket.io-client, could you give me some instruction for it?
My client is at here
package.json
and client.js
to local npm install
in the directorytransports
in client.js
to polling
node client.js
The nodejs client will check if there's binary support and then add b64=1
to url. The node server works with this well, but it seems netty-socketio doesn't support this extension.
Thanks for your example! I have fixed this issue. Please check
Confirmed, it works. Thanks for fixing this issue.
Hi Nikita, a release for this fix will be great.
BTW, you can add us AVOS Cloud as a user in the README.
i read my mind! i just released 1.7.1 ;)
:+1: Thanks!!
I'm testing netty-socketio with SocketIO-client 1.0.6, polling transport. The client never gets notification for
connect
. Then I found the server doesn't send connect packet to client.From code, I found it runs into the null block of ClientHead.java:
Could you please take a look if there's anything wrong ?