Comments (2)
Hi @jandre, it would be awesome if you wanted to start implementing it. I know I would benefit from that patch. If I'm not mistaken, it would mostly involve switching our emitted data events to .push()
calls, etc?
from node-nanomsg.
a wonderful idea and we ought to wholesale replace EventEmitter with the Duplex
base class.
just get rid the call to emit('message')
the API change would be like .on('data', callback)
instead of .on('message', callback)
data
is a few characters shorter than message
so it seems easier. plus you get a node stream.
keep the call to send the same, no need for any write()
method, yet all sender type sockets could be piped to from any source. by adding a _write()
method on the prototype, the Duplex
base class takes care of handing the writing for us, check it out:
from node-nanomsg.
Related Issues (20)
- duplicate receive messages arriving? HOT 1
- nn_send assert when IPv4only option was disabled, and try to connect with IPv4 address HOT 1
- add support for nng HOT 4
- Error handling HOT 3
- TypeError: Path must be a string. Received undefined HOT 2
- rfc links
- Compile error in Node V12.* HOT 6
- vulnerable dependencies HOT 1
- deprecation warning from Nan::Callback::call HOT 2
- DeprecationWarning: Buffer HOT 2
- remove package-lock.json from .gitignore HOT 2
- fallthrough warnings in nanomsg HOT 1
- are we handling scopes correctly? HOT 1
- How do i catch timeout on reqrep?
- Carsh When msg send 10K per second HOT 2
- Electron compatibility: "Loading non-context-aware native module in renderer" HOT 1
- node 14.15 compatability HOT 1
- (node:660) electron: The default of contextIsolation is deprecated and will be c hanging from false to true in a future release of Electron. HOT 2
- Double handle scope
- -Wcast-function-type in nodejs/src/node.h
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-nanomsg.