-
-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #661 from zeromq/update-deps [skip ci]
- Loading branch information
Showing
17 changed files
with
1,934 additions
and
1,888 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
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 |
---|---|---|
|
@@ -5,3 +5,5 @@ | |
/node_modules | ||
pnpm-lock.yaml | ||
/build | ||
/script/*.js | ||
/script/*.mjs |
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 |
---|---|---|
@@ -1,46 +1,39 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "JS-Attach", | ||
"type": "node", | ||
"request": "attach", | ||
"port": 9229, | ||
"continueOnAttach": true, | ||
"autoAttachChildProcesses": true, | ||
"resolveSourceMapLocations": [ | ||
"!**/node_modules/**", | ||
"!**/.vscode/extensions/hbenl.vscode-mocha-test-adapter-*/**" | ||
], | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Native-Launch", | ||
"preLaunchTask": "clean_build_debug", | ||
"program": "node", | ||
"suppressMultipleSessionWarning": true, | ||
"sourceLanguages": [ | ||
"cpp" | ||
], | ||
"args": [ | ||
"--inspect-brk=9229", | ||
"--expose-gc", | ||
"-r", | ||
"ts-node/register", | ||
"${workspaceFolder}/test/debug.ts" | ||
], | ||
} | ||
], | ||
"compounds": [ | ||
{ | ||
"name": "Node-Launch", | ||
"configurations": [ | ||
"Native-Launch", | ||
"JS-Attach", | ||
] | ||
} | ||
] | ||
"configurations": [ | ||
{ | ||
"name": "JS-Attach", | ||
"type": "node", | ||
"request": "attach", | ||
"port": 9229, | ||
"continueOnAttach": true, | ||
"autoAttachChildProcesses": true, | ||
"resolveSourceMapLocations": [ | ||
"!**/node_modules/**", | ||
"!**/.vscode/extensions/hbenl.vscode-mocha-test-adapter-*/**" | ||
], | ||
"skipFiles": ["<node_internals>/**"] | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Native-Launch", | ||
"preLaunchTask": "clean_build_debug", | ||
"program": "node", | ||
"suppressMultipleSessionWarning": true, | ||
"sourceLanguages": ["cpp"], | ||
"args": [ | ||
"--inspect-brk=9229", | ||
"--expose-gc", | ||
"-r", | ||
"ts-node/register", | ||
"${workspaceFolder}/test/debug.ts" | ||
] | ||
} | ||
], | ||
"compounds": [ | ||
{ | ||
"name": "Node-Launch", | ||
"configurations": ["Native-Launch", "JS-Attach"] | ||
} | ||
] | ||
} |
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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "clean_build_debug", | ||
"type": "shell", | ||
"command": "pnpm clean.release && pnpm build.debug", | ||
} | ||
] | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "clean_build_debug", | ||
"type": "shell", | ||
"command": "pnpm clean.release && pnpm build.debug" | ||
} | ||
] | ||
} |
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
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,18 @@ | ||
import * as zmq from "zeromq" | ||
|
||
async function run() { | ||
const sock = new zmq.Publisher() | ||
|
||
await sock.bind("tcp://127.0.0.1:3000") | ||
console.log("Publisher bound to port 3000") | ||
|
||
while (true) { | ||
console.log("sending a multipart message envelope") | ||
await sock.send(["kitty cats", "meow!"]) | ||
await new Promise(resolve => { | ||
setTimeout(resolve, 500) | ||
}) | ||
} | ||
} | ||
|
||
run() |
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,20 @@ | ||
import * as zmq from "zeromq" | ||
|
||
async function run() { | ||
const sock = new zmq.Subscriber() | ||
|
||
sock.connect("tcp://127.0.0.1:3000") | ||
sock.subscribe("kitty cats") | ||
console.log("Subscriber connected to port 3000") | ||
|
||
for await (const [topic, msg] of sock) { | ||
console.log( | ||
"received a message related to:", | ||
topic, | ||
"containing message:", | ||
msg, | ||
) | ||
} | ||
} | ||
|
||
run() |
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,17 @@ | ||
import * as zmq from "zeromq" | ||
|
||
async function run() { | ||
const sock = new zmq.Push() | ||
|
||
await sock.bind("tcp://127.0.0.1:3000") | ||
console.log("Producer bound to port 3000") | ||
|
||
while (true) { | ||
await sock.send("some work") | ||
await new Promise(resolve => { | ||
setTimeout(resolve, 500) | ||
}) | ||
} | ||
} | ||
|
||
run() |
Oops, something went wrong.