Clark (OP)
|
|
November 10, 2011, 06:10:20 PM |
|
Thanks for working on this! It will be nice to see more browsers able to use the live quote services!
|
|
|
|
Clark (OP)
|
|
November 10, 2011, 08:30:20 PM |
|
Awesome!
I've completed the transition of bitcoin.clarkmoody.com to the new socket.io interface.
|
|
|
|
MagicalTux
VIP
Hero Member
Offline
Activity: 608
Merit: 501
-
|
|
November 11, 2011, 02:15:24 AM |
|
Awesome!
I've completed the transition of bitcoin.clarkmoody.com to the new socket.io interface.
Hi, Just a detail, now the data sent to the function is no longer a string with some json inside, but an object (it didn't make much sense to just send strings). I didn't expect you'd have this implemented already, if you can just comment out the JSON.parse that'll fix everything. Mark
|
|
|
|
Clark (OP)
|
|
November 11, 2011, 02:16:57 AM |
|
Just a detail, now the data sent to the function is no longer a string with some json inside, but an object (it didn't make much sense to just send strings).
I didn't expect you'd have this implemented already, if you can just comment out the JSON.parse that'll fix everything.
Actually I was! I was just sitting here developing and I saw the messages change from strings to JSON!
|
|
|
|
throughput
|
|
November 16, 2011, 10:55:18 AM |
|
socket.io simply does not work atm. sooner or later getting the "7:::1+0" message. Firefox at http://bitcoin.clarkmoody.com/or handwritten socket.io application connection to https://socketio.mtgox.com/ - that does not matter. Interesting, though, connection passes handshake stage and receives "connect" message. Please, anyone possessing the knowledge about the "new technology", comment on what does the 1+0 message mean? socket.io-spec says: (7) Error
'7::' [endpoint] ':' [reason] '+' [advice]
For example, if a connection to a sub-socket is unauthorized.
just a nonsense. BTW, I still have not found more documentation on the protocol. OMFG. Is it undocumented?
|
|
|
|
Clark (OP)
|
|
November 16, 2011, 04:04:28 PM |
|
sooner or later getting the "7:::1+0" message.
Please, anyone possessing the knowledge about the "new technology", comment on what does the 1+0 message mean?
I have not seen this message, and I have a bit of experience with the socket.io interface now. BTW, I still have not found more documentation on the protocol. OMFG. Is it undocumented?
The protocol still follows the WebSocket protocol listed on the wiki. The incoming data are straight objects instead of JSON.
|
|
|
|
eldentyrell
Donator
Legendary
Offline
Activity: 980
Merit: 1004
felonious vagrancy, personified
|
|
January 31, 2012, 02:35:43 AM |
|
sooner or later getting the "7:::1+0" message.
Please, anyone possessing the knowledge about the "new technology", comment on what does the 1+0 message mean?
I have not seen this message, and I have a bit of experience with the socket.io interface now. I am getting the "7:::1+0" as well.
|
The printing press heralded the end of the Dark Ages and made the Enlightenment possible, but it took another three centuries before any country managed to put freedom of the press beyond the reach of legislators. So it may take a while before cryptocurrencies are free of the AML-NSA-KYC surveillance plague.
|
|
|
eldentyrell
Donator
Legendary
Offline
Activity: 980
Merit: 1004
felonious vagrancy, personified
|
|
January 31, 2012, 09:31:29 PM Last edit: February 02, 2012, 12:35:51 AM by eldentyrell |
|
I am getting the "7:::1+0" as well.
FWIW I am using the standard Java (not javascript) Socket.IO client.
|
The printing press heralded the end of the Dark Ages and made the Enlightenment possible, but it took another three centuries before any country managed to put freedom of the press beyond the reach of legislators. So it may take a while before cryptocurrencies are free of the AML-NSA-KYC surveillance plague.
|
|
|
eldentyrell
Donator
Legendary
Offline
Activity: 980
Merit: 1004
felonious vagrancy, personified
|
|
February 02, 2012, 12:39:20 AM |
|
Here is a self-contained piece of code that demonstrates the problem: import io.socket.*; import org.json.*; import net.tootallnate.websocket.*;
public class MtGoxStreaming { private static final String tickerChannel = "d5f06780-30a8-4a48-a2f8-7ed181b4a13f"; private static final String tradesChannel = "dbf1dee9-4f2e-4a08-8cb7-748919a71b21"; private static final String depthChannel = "24e67e0d-1cad-4cc0-9e7a-f8523ef460fe";
public static void main(String[] args) throws Exception { SocketIO socket = new SocketIO("https://socketio.mtgox.com/mtgox"); socket.connect(new IOCallback() { @Override public void onMessage(JSONObject json, IOAcknowledge ack) { try { System.out.println("We received a message: " + json.toString(2)); } catch (JSONException e) { e.printStackTrace(); } }
@Override public void onMessage(String data, IOAcknowledge ack) { System.out.println("We received a message:" + data); } @Override public void onError(SocketIOException socketIOException) { System.out.println("Something went wrong: " + socketIOException); socketIOException.printStackTrace(); //System.exit(0); }
@Override public void onDisconnect() { System.out.println("Disconnected"); System.exit(0); }
@Override public void onConnect() { System.out.println("Connected"); }
@Override public void on(String event, IOAcknowledge ack, Object... args) { System.out.println("got: " + event); ack.ack("Roger that!"); //socket.emit("answer", new JSONObject().put("msg", "Hello again Socket.io!")); } });
// This will be cached until the server is connected. //socket.emit("hello", new JSONObject().put("msg", "Hello Socket.io! :D")); JSONObject obj = new JSONObject(); obj.put("op", "subscribe"); //obj.put("channel", depthChannel); obj.put("channel", "d5f06780-30a8-4a48-a2f8-7ed181b4a13f"); socket.send(obj); } }
Run it and you get: Connected > 1::/mtgox > 4::/mtgox:{"op":"subscribe","channel":"d5f06780-30a8-4a48-a2f8-7ed181b4a13f"} > 2:: > 2:: > 2:: > 2:: > 2:: > 2:: > 2:: < 7:::1+0 Something went wrong: io.socket.SocketIOException: 1+0 io.socket.SocketIOException: 1+0
|
The printing press heralded the end of the Dark Ages and made the Enlightenment possible, but it took another three centuries before any country managed to put freedom of the press beyond the reach of legislators. So it may take a while before cryptocurrencies are free of the AML-NSA-KYC surveillance plague.
|
|
|
wareen
Millionaire
Legendary
Offline
Activity: 910
Merit: 1001
Revolutionizing Brokerage of Personal Data
|
|
February 17, 2012, 11:08:40 PM |
|
The problem was with the Java-WebSocket implementation. Gottox' socket.io recently switched to Weberknecht and it fixed the problem. Just pull the new version from github and you should be fine.
|
|
|
|
brox
Member
Offline
Activity: 71
Merit: 10
|
|
March 03, 2012, 07:41:50 PM |
|
The problem was with the Java-WebSocket implementation. Gottox' socket.io recently switched to Weberknecht and it fixed the problem. Just pull the new version from github and you should be fine. Man, you saved my life! It works like a charm now!
|
|
|
|
TheFootMan
|
|
December 11, 2013, 09:13:26 PM |
|
Is clark moody frozen?
|
|
|
|
Clark (OP)
|
|
December 11, 2013, 11:35:58 PM |
|
Is clark moody frozen?
Mt. Gox has disconnected its real time WebSocket.
|
|
|
|
TrustedPartner
Newbie
Offline
Activity: 3
Merit: 0
|
|
February 16, 2014, 10:43:08 AM |
|
Anybody buying or selling within MtGox to other MtGox traders for real cash for MtGoxBTC to each other? Any talk about that?
|
|
|
|
|