如何关闭此websocket连接?/我在这里使用此代码做错了什么?
var conn;
function connect_mtgox() {
conn = io.connect('http://socketio.mtgox.com/mtgox');
conn.on('message', function (data) {
last_price = (data.ticker.last.value_int);
});
}
function stop_mtgox()
{
conn.close();
}
链接: mtgox API https://en.bitcoin.it/wiki/MtGox/API/Streaming
由于