uzo

Browser client for Uzo

npm install uzo
2 downloads in the last week
4 downloads in the last month

Real-time Transport Library for Golang. It's under development right now.

Usage

In Server:

import "github.com/azer/uzo"

http.ListenAndServe("0.0.0.0:4000", uzo.OnOpen(server, func (io uzo.IO) {
  io.Pub("{ \"foo\": 123 }")

  io.Sub(func (msg *uzo.Message) {
    fmt.Printf("New message: %s @ %s \n", msg.Content, msg.Ts)
  })
}))

In Browser:

io = require('uzo')(':4000')

io.sub(function (message) {
  console.log('< message', message)
})

io.pub({ 'hello': 'world' })
npm loves you