stream socket tunnel problem

This forum contains topics that were moved from Get Satisfaction
Ram
Posts: 0
Joined: Fri Aug 02, 2013 12:15 pm

stream socket tunnel problem

Post by Ram »

Hi All,

i'm calling the following JS function that "push" real time data:

pre
function TestMtGox(){
var conn = io.connect('https://socketio.mtgox.com/mtgox?Currency=USD');
conn.on('message', function (data) {
var response = JSON.stringify(data);
localStorage.setItem("MtGoxStream", response);
});
}
/pre

it worked okay for once or twice and since i cant make to to work again, here's my console:

Image

when testing the same code outside appery i get the data stream without any problems...

pls advice.

Thanks much in advance!!!
Best,
Ram

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

stream socket tunnel problem

Post by Maryna Brodina »

Hello! Service you added to your app is not REST service for duplex connection between server and browser http://ru.wikipedia.org/wiki/WebSocket. So you can't use REST mechanism of Appery.io to implement this service. Besides that Appery.io proxy is not used to transmit data with WebSocket protocol.
You would need to use JS to work with this service.

Ram
Posts: 0
Joined: Fri Aug 02, 2013 12:15 pm

stream socket tunnel problem

Post by Ram »

thank you.

can you point me to some JS example on how to do this?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

stream socket tunnel problem

Post by Maryna Brodina »

Sorry, unfortunately we don't have code sample, but these links should help http://www.adobe.com/devnet/html5/art...
http://www.developerfusion.com/articl...

Ram
Posts: 0
Joined: Fri Aug 02, 2013 12:15 pm

stream socket tunnel problem

Post by Ram »

got it, thx much!

Post Reply