Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
N
node-bigstream
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bs
node-bigstream
Commits
a05984c2
Commit
a05984c2
authored
Feb 23, 2017
by
project
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
10d66e4b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
0 deletions
+55
-0
package.json
package.json
+1
-0
bind.js
test/axon/bind.js
+34
-0
conn.js
test/axon/conn.js
+20
-0
No files found.
package.json
View file @
a05984c2
...
...
@@ -14,6 +14,7 @@
"dependencies"
:
{
"
amqplib
"
:
"^0.4.2"
,
"
async
"
:
"^2.0.1"
,
"
axon
"
:
"^2.0.3"
,
"
body-parser
"
:
"^1.15.2"
,
"
bson
"
:
"^0.5.6"
,
"
buffalo
"
:
"^0.1.3"
,
...
...
test/axon/bind.js
0 → 100644
View file @
a05984c2
// var axon = require('axon');
// var sock = axon.socket('push');
//
// sock.bind('tcp://0.0.0.0:3333')
// console.log('push server started');
//
// sock.on('disconnect',function(dat){
// console.log(dat._peername);
// })
//
// sock.on('connect',function(dat){
// console.log('connect');
// console.log(dat._peername);
// })
//
//
// var i=0;
// setInterval(function(){
// var t = {'t':'hello','seq':i++}
// sock.send(t);
// }, 1500);
var
axon
=
require
(
'axon'
);
var
sock
=
axon
.
socket
(
'rep'
);
sock
.
bind
(
'tcp://0.0.0.0:3333'
)
sock
.
on
(
'message'
,
function
(
img
,
reply
){
// resize the image
console
.
log
(
'receive'
);
var
rep
=
img
;
rep
.
note
=
'rep'
;
reply
(
rep
);
});
test/axon/conn.js
0 → 100644
View file @
a05984c2
// var axon = require('axon');
// var sock = axon.socket('pull');
//
// sock.connect('tcp://127.0.0.1:3333');
//
// sock.on('message', function(msg){
// console.log(msg);
// });
var
axon
=
require
(
'axon'
);
var
sock
=
axon
.
socket
(
'req'
);
sock
.
connect
(
'tcp://127.0.0.1:3333'
);
var
img
=
{
't'
:
'hello'
}
sock
.
send
(
img
,
function
(
res
){
console
.
log
(
res
);
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment