npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

native-pipe

1.0.0

@mafintosh

npmHomeRepoSnykSocket
Downloads:0
$ npm install native-pipe
DailyWeeklyMonthlyYearly

native-pipe

Pipes that only depend on n-api.

npm install native-pipe

Usage

const NativePipe = require('native-pipe')

const stream = new NativePipe('/tmp/server.sock') // or a \\pipe\... on windows

stream.write('hello world')

stream.on('data', function (data) {
  console.log(data)
})

API

stream = new NativePipe(pipeNameOrFd)

Make a new pipe. Returns a duplex stream. You can either pass the name of the pipe or an fd, like 0, 1, 2 for stdio.

See streamx for the full stream api.

TODO

Pipe servers.

License

MIT