socket.IO-objc icon indicating copy to clipboard operation
socket.IO-objc copied to clipboard

Support for socket.IO 1.0

Open mstdokumaci opened this issue 10 years ago • 39 comments

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

mstdokumaci avatar Mar 28 '14 14:03 mstdokumaci

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

pkyeck avatar Mar 28 '14 14:03 pkyeck

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

pkyeck avatar Mar 28 '14 15:03 pkyeck

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 ...

pkyeck avatar May 29 '14 06:05 pkyeck

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.

yosuke-furukawa avatar May 30 '14 09:05 yosuke-furukawa

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

notedit avatar May 31 '14 09:05 notedit

I agree, support for socket.io 1.0 would be awesome :+1:

koenbud avatar Jun 03 '14 07:06 koenbud

+1, need support for v1.0

nkalkounis avatar Jun 03 '14 19:06 nkalkounis

+1

alexpiezo avatar Jun 03 '14 19:06 alexpiezo

@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 avatar Jun 04 '14 07:06 pkyeck

@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.

koenbud avatar Jun 10 '14 08:06 koenbud

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

mkny avatar Jun 16 '14 21:06 mkny

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

Micka33 avatar Jun 17 '14 16:06 Micka33

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

scottweinert avatar Jun 18 '14 02:06 scottweinert

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

ctlacko avatar Jun 19 '14 22:06 ctlacko

Support for socket.io 1.0.x #197

jbaez avatar Jul 01 '14 08:07 jbaez

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

mehtatejas avatar Jul 23 '14 01:07 mehtatejas

+1

Also, @sweinertjr! Sup!

tslater avatar Aug 01 '14 06:08 tslater

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?

rauberdaniel avatar Aug 07 '14 17:08 rauberdaniel

Waiting for 1.0 support and also for swift support. :+1:

jklinson avatar Aug 22 '14 06:08 jklinson

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

TofPlay avatar Aug 22 '14 08:08 TofPlay

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

mounibec avatar Sep 20 '14 10:09 mounibec

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

ElyasNaranjeeSani avatar Sep 22 '14 07:09 ElyasNaranjeeSani

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

francoisp avatar Sep 22 '14 22:09 francoisp

@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.

pkyeck avatar Sep 23 '14 05:09 pkyeck

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

Tejas-narola avatar Dec 17 '15 06:12 Tejas-narola

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

pkyeck avatar Dec 17 '15 08:12 pkyeck

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

jbaez avatar Dec 17 '15 08:12 jbaez

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😂

b9AobJ avatar Dec 02 '16 03:12 b9AobJ

@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?

marcuschoong avatar Apr 12 '18 07:04 marcuschoong

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

b9AobJ avatar Apr 16 '18 02:04 b9AobJ