shuoli84 / SocketIOCocoa

The socket 1.0 client in Swift
175 stars 11 forks source link

这在Socket.io 1.2.0下能工作吗? #1

Closed raymondos closed 9 years ago

raymondos commented 9 years ago

服务器没接到handshake请求,请问在1.2.0的socket.io服务端能否通信?有demo之类的参考吗?

shuoli84 commented 9 years ago

I'll check this, I am testing under 1.0, but it should work under 1.2. Can you paste the error log?

raymondos commented 9 years ago

Hi @shuoli84 , 经过测试在1.2.0下能正常工作,我找到问题在于我们服务器端需要首次握手的时候带上登陆验证的userToken。 在web端利用socketio-client大概是这样 socket = io.connect('http://127.0.0.1:8080', {'query': 'userToken=' + JSON.stringify(userInfo)} ); SocketIOCocoa里面有相应的支持吗,还是需要自己对库做相应的修改?

shuoli84 commented 9 years ago

It is easy to add the feature, I will implement it later. If you already done some work, pull request is welcomed :)

发自我的 iPhone

在 2014年11月19日,上午10:54,Raymond.Yang notifications@github.com 写道:

Hi @shuoli84 , 经过测试在1.2.0下能正常工作,我找到问题在于我们服务器端需要首次握手的时候带上登陆验证的userToken。 在web端利用socketio-client大概是这样 socket = io.connect('http://127.0.0.1:8080', {'query': 'userToken=' + JSON.stringify(userInfo)} ); SocketIOCocoa里面有相应的支持吗,还是需要自己对库做相应的修改?

— Reply to this email directly or view it on GitHub.

raymondos commented 9 years ago

That is awesome! Thanks.