oz-web
oz's web components
// server.jsvar ozweb = var server = ozweb server
// client.jsvar client = client
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 dependenciesoz-web.all.js
: the client library with its dependencies bundledoz-web.min.js
: the minified client libraryoz-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.