Neutered Puppy Masquerade
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    stream-rpcpublic

    stream-rpc

    RPC over arbitrary streams

    rpc = require 'stream-rpc'
    
    client = rpc(timeout: 1000)
    server = rpc
      handle: (request, done) ->
        done(null, request)
    
    client.pipe(server).pipe(client)
    

    or

    {json} = require 'stream-serializer'
    
    client
      .pipe(json)
      .pipe(serverConnectedSocket)
      .pipe(json)
      .pipe(client)
    
    server
      .pipe(json)
      .pipe(clientConnectedSocket)
      .pipe(json)
    

    Keywords

    none

    install

    npm i stream-rpc

    Downloadsweekly downloads

    3

    version

    0.1.1

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar