1.2.1 • Published 1 year ago

callbag-net v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

callbag-net

Callbag listenable source that connects using nodejs net.Socket interface.

Read more about the Callbag standard here.

Example

// see: ./example/client.js
import { Client } from 'callbag-net'
import { createServer } from './server.mjs'
import { pipe, forEach } from 'callbag-basics-esmodules'

const source = Client({ port: 1234, host: 'localhost' })
createServer(1234, 'hello')

pipe(
  source,
  forEach(v /* Buffer */ => {
    console.log(v)
    console.log(v.toString())
  })
)
<Buffer 68 65 6c 6c 6f>
hello
Client(options: net.SocketConnectOpts, connectionListener?: (() => void))
1.2.1

1 year ago

1.2.0

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago