This forum is read only and just serves as an archive. If you have any questions, please post them on

1 decade ago by CG_Wang

I have a finished html5 game and I used websocket in it. Now I am thinking about porting it to IPad using Ejecta, but found out that no websocket could be used here.

So, I would like to ask that, did anyone have experience about using websocket in Ejecta, or have any ideas about how to make websocket working with Ejecta?

I would be appreciate it if someone could give some ideas.

1 decade ago by dominic

This will require some work, but it should be entirely doable.

SocketRocket seems to be a robust WebSocket implementation for Objective-C. You could probably hook this up to JavaScript with an EJBinding* class (as described here ) and provide all the functions from the API.

Edit: WebSockets are supported in Ejecta now. See:

1 decade ago by Slightfx

What did you find out dominic ? :)

1 decade ago by Philip

When I developed Steamclash I used websockets to test the whole thing a lot easier. Then I wrote some little code and got the networking done with gamekit, which helped a lot. But of course thats just for local networking. But it worked great. If this is what you want, you can find the code here: Keep in mind that the code is over a year old. That means it's written for iOSImpact and iOS 5.

1 decade ago by McFussyPants

I'm just getting started with Ejecta and my websocket html5 game. I would love to help test whatever there is. Or flail around and try to add SocketRocket to the mix myself.

1 decade ago by McFussyPants

Has anyone had experience extending Ejecta?

I attempted to follow the instructions on I'm working with the latest pull from git-hub from yesterday.

I'm getting an error from javascript when trying the sample:

ReferenceError: Can't find variable: simpleTest at line 2 in js/test.js

Here's the source in case I made some mistake:

Just letting you know, I'm attempting to integrate SocketRocket into Ejecta:

connection = new Ejecta.SocketRocket();

causes an error:
TypeError: 'undefined' is not a constructor (evaluating 'new Ejecta.SocketRocket()') at line 117 in js/util.js

I'm an objective c newbie. So be kind.. :-) But I don't see anything substantially different from the other classes in there. If anyone has time to consider, I would appreciate an opinion.


1 decade ago by McFussyPants

Simple problem, the class prefix was Ej instead the required all caps EJ.

I have a working SocketRocket websocket now integrated in Ejecta! I'm so happy I will be able to roll over my multi player work. I wish it was compatible with backend that I'm using. But that adds another layer on top of websockets that SocketRocket doesn't handle now. Still, happy to get it working any way I can.

I have committed the changes to the forked repo here:

I would be happy to post some minimal example client and server code to get people started.

Dominic, if you are happy with these changes, how do I submit a pull request?
Page 1 of 1
« first « previous next › last »