Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Support for socket.IO 1.0 #162

Open
mstdokumaci opened this issue Mar 28, 2014 · 39 comments
Open

Support for socket.IO 1.0 #162

mstdokumaci opened this issue Mar 28, 2014 · 39 comments
Assignees

Comments

@mstdokumaci
Copy link

npm automatically updates socket.io to version 1.0 now. and this library doesn't support new version, stalls at handshake.

@pkyeck pkyeck self-assigned this Mar 28, 2014
@pkyeck
Copy link
Owner

pkyeck commented Mar 28, 2014

socket.io v1.0 isn't final yet but I'll take a look at this. thanks for the heads up.

@pkyeck
Copy link
Owner

pkyeck commented Mar 28, 2014

when fetching the current version from NPM, I still get the 0.9.16.
https://www.npmjs.org/package/socket.io

@pkyeck
Copy link
Owner

pkyeck commented May 29, 2014

ok, v1.0 landed, including some major changes that break the current version of the library.
I don't have the time right now to implement the new protocol ... but maybe someone other than me wants to try ...

I did take a look at v1.0 back in march and started to adjust the library but couldn't finish it - will check in the "work in progress" to a dedicated branch. maybe someone can use this as a starting point.

come august I'll have some spare time at my hands ...

@yosuke-furukawa
Copy link

Can we connect socket.io [email protected] using master brunch?

I need not to use new features (like binary support), however, socket.io v0.9.16 has problems (like memory leaks)...
SO we would like to upgrade socket.io servers to v1.0.

If you don't have time to support v1.0, I would like to check your work in progress branch.

@notedit
Copy link

notedit commented May 31, 2014

+1, socket.io v1.0 looks cool.

@koenbud
Copy link

koenbud commented Jun 3, 2014

I agree, support for socket.io 1.0 would be awesome 👍

@nkalkounis
Copy link

+1, need support for v1.0

@alexpiezo
Copy link

+1

@pkyeck
Copy link
Owner

pkyeck commented Jun 4, 2014

@yosuke-furukawa no, not even the connection works anymore.
@ALL others please stop +1-ing - I know that this would be great but I don't have the time right now.
keep you updated when this changes ...

@pkyeck pkyeck added task and removed bug labels Jun 4, 2014
@koenbud
Copy link

koenbud commented Jun 10, 2014

@pkyeck The people +1'ing are not pressuring you to do it, they are just expressing the need for an update. Developers looking to do something worthwhile might pick up on it and start committing new code.

@mkny
Copy link

mkny commented Jun 16, 2014

I've tried to implement just the Handshake Url's but didnt work well.. Hope you got some time to work it out @pkyeck

@Micka33
Copy link

Micka33 commented Jun 17, 2014

We are thousands to hope for it, but it seems that few of us are able to get it done...

@scottweinert
Copy link

+1 - 1.0+ support would be great. It is much smoother than previous versions.

@ctlacko
Copy link

ctlacko commented Jun 19, 2014

It seems that they've offloaded the transports and browser incompatibilities into a separate module.

Here's a link to the new protocol definition:
https://github.com/automattic/engine.io-protocol

And the corresponding blog post:
http://socket.io/blog/introducing-socket-io-1-0/#new-engine

@jbaez
Copy link

jbaez commented Jul 1, 2014

Support for socket.io 1.0.x #197

@mehtatejas
Copy link

+1 - 1.0+ support would be great. It is much smoother than previous versions.

@tslater
Copy link

tslater commented Aug 1, 2014

+1

Also, @sweinertjr! Sup!

@rauberdaniel
Copy link

I also would love to see 1.0+ support. Thanks for your work, @pkyeck!

Does anyone know if it’s possible / easy to port everything to swift, so that it’s not necessary to use the Obj-C bridge?

@jklinson
Copy link

Waiting for 1.0 support and also for swift support. 👍

@TofPlay
Copy link

TofPlay commented Aug 22, 2014

@jklinson: Waiting for 1.0 support and also for swift support. 👍
Me too 👍

@mounibec
Copy link

It'll be really great to have support for 1.x.

@ElyasNaranjeeSani
Copy link

Socket 1.x support would be great.:+1:

@francoisp
Copy link

I forked francoistemasys's great fork (it provides some socketio1.0 support) to add ack callback support to it(txt only, not binary). In the process I broke some 0.9 support (see comment in socketiopacket.m easy to fix)

https://github.com/francoisp/socket.IO-objc

Also, I just came accross this, linked on the socketio's ws but not ranking v high with google, it might be of interest if 0.9 support is not required: https://github.com/MegaBits/SIOSocket

@pkyeck
Copy link
Owner

pkyeck commented Sep 23, 2014

@francoisp thanks for the link - he uses a javascript-bridge for the "native" implementation - clever ;) so there are multiple libraries that support 1.0. not fully right now but growing in scope. happy to see this. I'll link to your fork and the other link in the readme.

@Tejas-narola
Copy link

@pkyeck Just for knowledge , do you think you will have time to create library support for v1.0 ?

@pkyeck
Copy link
Owner

pkyeck commented Dec 17, 2015

@Tejas-narola no, sadly not. but as I said before, if someone wants to contribute - be my guest

@jbaez
Copy link

jbaez commented Dec 17, 2015

Looks that there is now a native implementation of the client for 1.0: https://github.com/socketio/socket.io-client-swift

@b9AobJ
Copy link

b9AobJ commented Dec 2, 2016

thx for @francoisp ,it fix my demand,i want to create static library with use oc,if i use socket.io-client-swift to dynamic library,it will increase 70M+ libSwiftBridge.framework to my project😂

@marcuschoong
Copy link

marcuschoong commented Apr 12, 2018

@b9AobJ I'm using https://github.com/francoisp/socket.IO-objc and tried to connect to my socket server but couldn't connect. following is the log file.

2018-04-12 15:29:31.518 SocketTesterARC[98538:14802812] Connecting to socket with URL: http://2cad7a38-ff.zzz.info/socket.io/1/?EIO=2&transport=polling&t=1523518171516&role=visitor
2018-04-12 15:29:31.703 SocketTesterARC[98538:14802812] didReceiveResponse() 200
2018-04-12 15:29:35.076 SocketTesterARC[98538:14802812] connectionDidFinishLoading()
2018-04-12 15:29:35.082 SocketTesterARC[98538:14802812] VERSION 10x
2018-04-12 15:29:35.082 SocketTesterARC[98538:14802812] Response {"sid":"ive1ab-NpEVYlpdBAAAT","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000}
2018-04-12 15:29:35.082 SocketTesterARC[98538:14802812] websocket supported -> using it now
2018-04-12 15:29:35.082 SocketTesterARC[98538:14802812] Received All information:
sid: ive1ab-NpEVYlpdBAAAT
heartbeat: 25.000000
Transport: <SocketIOTransportWebsocket: 0x7b90a580>
2018-04-12 15:29:38.436 SocketTesterARC[98538:14802812] start/reset Heartbeat
2018-04-12 15:29:38.437 SocketTesterARC[98538:14802812] Prepare to send()
2018-04-12 15:29:38.437 SocketTesterARC[98538:14802812] queue >>> 2probe
2018-04-12 15:29:42.761 SocketTesterARC[98538:14802812] onDisconnect()
2018-04-12 15:29:44.823 SocketTesterARC[98538:14802812] socket.io disconnected. did error occur? Error Domain=org.lolrus.SocketRocket Code=2132 "received bad response code from server 400" UserInfo={NSLocalizedDescription=received bad response code from server 400}

i would like to create static library with objective C as well, do you able to achieve it?

@b9AobJ
Copy link

b9AobJ commented Apr 16, 2018

@marcuschoong
I give up use this pr,and use this cpp project into my workspace,
https://github.com/socketio/socket.io-client-cpp

@marcuschoong
Copy link

marcuschoong commented Apr 16, 2018

@b9AobJ
Thanks for the suggestion, the best option might using the libsioclient.a directly but the documentation for implement is not clear.
Currently I'm having problem with the websocketpp/client.hpp not found problem.
Possible you can show me the step to use this source?
Thousand thanks.

@b9AobJ
Copy link

b9AobJ commented Apr 17, 2018

@marcuschoong
it is very long time to build it.so i don't remember how to rebuild it . I try to build it today but failed.maybe you could try this:
https://github.com/socketio/socket.io-client-cpp/blob/master/INSTALL_IOS.md
i know the cocoapods is ok and you can use this.
and option 3 i can't rebuild it now.

@marcuschoong
Copy link

@b9AobJ
I need to create the project as cocoapod static library, by using pod for CPP allow me to create the project as static library? if yes, how should I include the pod into static library?

@tooolkit
Copy link

@marcuschoong hi, i also need to create a static library using socket i.o, have you solve the problem?

@marcuschoong
Copy link

marcuschoong commented Jul 18, 2018 via email

@b9AobJ
Copy link

b9AobJ commented Jul 19, 2018

@tooolkit @marcuschoong
try this:
pod 'SocketIO-Client-CPP',

or use pod search SocketIO-Client-CPP, get other version;

SocketIO-Client-CPP (1.6.1)
   SocketIO-Client-CPP
   pod 'SocketIO-Client-CPP', '~> 1.6.1'
   - Homepage: https://github.com/hfossli/SocketIO-Client-CPP-iOS-Builds
   - Source:   https://github.com/hfossli/SocketIO-Client-CPP-iOS-Builds.git
   - Versions: 1.6.1, 1.6.0, 1.5.0.1, 1.5.0 [master repo]

@tooolkit
Copy link

@b9AobJ thx, i had choose the cpp version ,but i'm not familiar with cpp ,i can contact the server and when emit i can receive data. but i don't know how to get the data . have no idea how to cast objc type like NSDictionary to cpp. thank you very much.

@b9AobJ
Copy link

b9AobJ commented Jul 19, 2018

@tooolkit sorry, i use this to create project is 2016/11,and i forget about this project that how to use,i think is very simple for you ,maybe you could try to learn his API
https://github.com/socketio/socket.io-client-cpp/blob/master/API.md
And learn this
https://socket.io/docs/

@tooolkit
Copy link

@b9AobJ thx for your replay. you are so kind. i have solve the problem cast data between std::map and NSDictionary. thank you very much. but maybe socket.io-client-cpp cant use in a static library. so many problems even i create a new project and just use socket.io-client-cpp. i made a issue to them . thank you very much.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests