Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using socket.io-client. #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "3rd/socket.io-client"]
path = 3rd/socket.io-client
url = https://github.com/kazuyukitanimura/socket.io-client.git
1 change: 1 addition & 0 deletions 3rd/socket.io-client
Submodule socket.io-client added at e69fc7
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Node.js Compatibility
There is some issues with the code from Peter, and with the new improvements on node.js 0.6 this lib __don't work__ correctly.Work fine only with node.js 0.4
# Changes

Please be sure of use node.js 0.4 (recommended 0.4.12) before use this lib.
I made this fork to reuse socket.io-client. It wasn't as simple as I'd hoped because LearnBoost hasn't updated the official branch with WSS/HTTPS functionality. For this reason, I am referencing the [kazuyukitanimura](https://github.com/kazuyukitanimura/socket.io-client) branch of socket.io-client.

## hook.io-ws
# hook.io-ws
Hook listening messages on *WebSocket* client connection.

Based on [Peter Griess](https://github.com/pgriess/node-websocket-client) work. [WebSocket Nodejs Client](https://github.com/pgriess/node-websocket-client)
Expand All @@ -18,7 +17,12 @@ Based on [Peter Griess](https://github.com/pgriess/node-websocket-client) work.


## Installation
npm install hook.io-ws

I don't want to pollute npm since this is a branch, so for now, here is how you get it to work:

- clone this repo
- cd into it
- npm install 3rd/socket.io-client

## Usage
hookio-ws
Expand All @@ -34,7 +38,7 @@ var WebSocketHook = require('hook.io-ws').HookSocket;

var mtgoxTest = new WebSocketHook({
name: 'mtgox',
url:'ws://websocket.mtgox.com/mtgox',
url:'https://socketio.mtgox.com/mtgox',
debug:false
});

Expand All @@ -61,7 +65,7 @@ var MtgoxHook = exports.MtgoxHook = function(options){
"name": "mtgox-ws-hook",
"type": "ws", // Doing this. Hook.io will look for hook.io-ws
"debug": "false",
"url": "ws://websocket.mtgox.com/mtgox"
"url":'https://socketio.mtgox.com/mtgox',
}], function(err){
// spawn ready
self.on('*::websocket::message',function(message){
Expand Down
2 changes: 1 addition & 1 deletion bin/ws
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var WebSocketHook = require('../lib/ws').HookSocket;

var mtgoxTest = new WebSocketHook({
name: 'mtgox',
url:'ws://websocket.mtgox.com/mtgox',
url:'https://socketio.mtgox.com/mtgox',
debug:false
});

Expand Down
Loading