Neon Power Mains

    This package has been deprecated

    Author message:

    For now, this project is deprecated. I no longer use or work on it, and doubt others are using it. If by any chance you were using this, and would like to see more of it in some form, let me know: justnvdm@gmail.com

    oz-web

    0.1.1 • Public • Published

    oz-web

    Build Status

    oz's web components

    // server.js
    var ozweb = require('oz-web')
    var server = ozweb.server(2332)
     
    server.in()
      .each(console.log)
      .done()
     
    setInterval(function() {
      server.out().put(23)
    }, 500)
    // client.js
    var client = ozweb('ws://localhost:2332')
     
    client.in()
      .tap(sig.log)
      .map(function(v) { return v + 1 })
      .to(client.out())

    example

    browser client

    $ bower install oz-msg
    

    node.js server / node.js client

    $ npm install oz-msg
    

    usage

    browser client

    For bundling systems supporting commonjs, oz-web.client is accessible via require('oz-web/client').

    The client is also accessible via one of the build/ files:

    • oz-web.js: the client library without its dependencies
    • oz-web.all.js: the client library with its dependencies bundled
    • oz-web.min.js: the minified client library
    • oz-web.all.js: the minified cliebt library with its dependencies bundled

    If no module system is found, the client library is exposed as the global ozweb.

    nodejs client

    require('oz-web').client or require('oz-web/client')

    nodejs server

    require('oz-web').server

    api

    ozweb.server(port)

    Creates an oz-web server and tells its underlying engine.io Server to listen on the given port.

    ozweb.server(httpServer)

    Creates an oz-web server and tells its underlying engine.io Server to attach to the given httpServer.

    server.in()

    Returns the server's input sig.

    server.out()

    Returns the server's output sig.

    ozweb.client(addr)

    Creates a client socket connected to the address addr.

    client.in()

    Returns the clients's input sig.

    client.out()

    Returns the clients's output sig.

    Install

    npm i oz-web

    DownloadsWeekly Downloads

    0

    Version

    0.1.1

    License

    MIT

    Last publish

    Collaborators

    • justinvdm