Page 1 of 1

stream socket tunnel problem

Posted: Tue Sep 10, 2013 11:57 am
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


stream socket tunnel problem

Posted: Tue Sep 10, 2013 12:45 pm
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.


stream socket tunnel problem

Posted: Tue Sep 10, 2013 1:31 pm
by Ram

thank you.

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


stream socket tunnel problem

Posted: Tue Sep 10, 2013 2:07 pm
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...


stream socket tunnel problem

Posted: Wed Sep 11, 2013 9:17 am
by Ram

got it, thx much!