Real-time Transport Library In Go & JavaScript
JavaScript Go
Latest commit 627e400 Aug 19, 2014 @azer azer Update README.md
Failed to load latest commit information.
client first commit Nov 7, 2013
example first commit Nov 7, 2013
.gitignore first commit Nov 7, 2013
README.md Update README.md Aug 20, 2014
client.go first commit Nov 7, 2013
conn.go first commit Nov 7, 2013
debug.go first commit Nov 7, 2013
io.go first commit Nov 7, 2013
message.go first commit Nov 7, 2013
on-open.go first commit Nov 7, 2013
transport.go first commit Nov 7, 2013

README.md

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

Usage

In Server:

import "github.com/ballet/ballet"

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

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

In Browser:

var io = require('ballet')(':4000')

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

io.pub({ 'hello': 'world' })