Skip to content

JeffreyDing11223/Pusher-Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pusher-Client

example

main.go

package main

import (
	"github.com/JeffreyDing11223/Pusher-Client/pusher"
)

func main() {

	global.PusherCli= &pusher.PusherClient{
		Key: "de504dc5763aeef9ff52",
		PushUrl:"ws://ws.pusherapp.com:80/app/%s?protocol=7",
	}

	errpusher := global.PusherCli.New()
	if errpusher != nil {
		panic(errpusher)
	}
  
  ch:=make(chan int,1)
  <-ch

}

pusher/connection.go

	var SubChannel []*Channel
	btcusd := p.Channel("")  //set channel what you want to receive
	ethusd := p.Channel("")  //set channel what you want to receive
	SubChannel=append(SubChannel,btcusd)
	SubChannel=append(SubChannel,ethusd)
	go Handler(SubChannel)

About

Pusher client for Go , base on websocket

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages