summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mrexodia/wray/examples/publish.go
blob: 9a08a3768ef979a7b3b91345529c9210467e8a62 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package main

import "github.com/pythonandchips/wray"
import "fmt"

func main() {
  wray.RegisterTransports([]wray.Transport{ &gofaye.HttpTransport{} })
  client := wray.NewFayeClient("http://localhost:5000/faye")

  params := map[string]interface{}{"hello": "from golang"}
  fmt.Println("sending")
  client.Publish("/foo", params)
}