GitXplorerGitXplorer
N

addon-stream

public
12 stars
1 forks
2 issues

Commits

List of commits on branch master.
Unverified
fa1fb63e16e390a8354f84ba9f64bdd200ef22a6

End passthrough example

NNickNaso committed 6 years ago
Unverified
2941074410566c78869377bbb11636747c3b863f

Fix typo on documentation

NNickNaso committed 6 years ago
Unverified
3e75b897aa310582f7ea72544bcfd378eae8dd2f

Ended documentation

NNickNaso committed 6 years ago
Unverified
6db466330a7221536332d3ea1df2c3d5f680c3a9

Start documentation

NNickNaso committed 6 years ago
Unverified
808eed53dcc20440094a5d1b8626ab45b64001c5

Changed name to the example

NNickNaso committed 6 years ago
Unverified
a6dc41da5ce459db9c6e5f0363e46d433bef4150

passthrough example

NNickNaso committed 6 years ago

README

The README file for this repository.

How to use Stream on Node.js Native Add-ons

How to use and create stream on Node.js native add-ons with N-API

A stream is an abstract interface for working with streaming data in Node.js. The stream module provides a base API that makes it easy to build objects that implement the stream interface.

There are many stream objects provided by Node.js. For instance, a request to an HTTP server and process.stdout are both stream instances.

Streams can be readable, writable, or both. All streams are instances of EventEmitter.

Here you can find an examples where I used a Transform stream to pass and get back data from a native add-on. This is a simple passthrough example.

In the passthrough directory, run:

$ npm install
$ node-gyp rebuild
$ node index.js or npm start

Examples

Node.js C / C ++ Addons

N-API

Node Addon API

Header-only C++ wrapper classes for the ABI-stable Node.js API

Web resources

Nicola Del Gobbo

https://github.com/NickNaso/

https://www.npmjs.com/~nicknaso

https://twitter.com/NickNaso

Acknowledgements

Thank you to all people that encourage me every day.

License

Licensed under Apache license V2