-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
working push, pull, and subscribe using axon
- Loading branch information
1 parent
7a40aa6
commit 2af644b
Showing
51 changed files
with
3,032 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
var axon = require('axon') | ||
, sock = axon.socket('pull'); | ||
sock.bind(3000); | ||
// sock.connect(3000); | ||
|
||
sock.on('message', function(msg){ | ||
console.log("************************************"); | ||
console.log(msg.toString()); | ||
}); | ||
|
||
|
||
var axon = require('axon') | ||
, sockPush = axon.socket('push'); | ||
|
||
sockPush.connect('tcp://000.000.0.000:3000'); | ||
console.log('push server started'); | ||
|
||
setInterval(function(){ | ||
sockPush.send(); | ||
console.log("************************************"); | ||
console.log("omgz STEPHEN IS PUSHING") | ||
}, 500); | ||
|
||
var axon = require('axon') | ||
, sockSub = axon.socket('sub'); | ||
|
||
sockSub.connect("tcp://000.000.0.00:3000"); | ||
|
||
sockSub.on('message', function(msg){ | ||
console.log("************************************"); | ||
console.log(msg.toString()); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.