func (self *Client) Unsubscribe(channel string) {
	self._unsubscribe <- channel
}
UnSubscribe unsubscribes the client from the channel
package pusher
import (
	"encoding/json"
	"log"
	s "strings"
	"time"
)
const (
	defaultScheme = "wss"
	defaultHost   = "ws.pusherapp.com"
	defaultPort   = "443"
)
type Client struct {
	ClientConfig
	bindings chanbindings
	globalBindings map[*func(string, string, interface{})]struct{}
	*connection
	_subscribe   chan *Channel
	_unsubscribe chan string
	_disconnect  chan bool
	Connected    bool
	Channels     []*Channel
	UserData     Member
	Debug        bool
}
type ClientConfig struct {
	Scheme       string
	Host         string
	Port         string
	Key          string
	Secret       string
	AuthEndpoint string
}
type Event struct {
	Name    string `json:"event"`
	Channel string `json:"channel"`
	Data    string `json:"data"`
}
type evBind map[string]chan (interface{})
type chanbindings map[string]evBind
func New(key string) *Client {
	config := ClientConfig{
		Scheme: defaultScheme,
		Host:   defaultHost,
		Port:   defaultPort,
		Key:    key,
	}
	return NewWithConfig(config)
}
func NewWithConfig(c ClientConfig) *Client {
	client := &Client{
		ClientConfig: c,
		bindings:     make(chanbindings),
		globalBindings: map[*func(string, string, interface{})]struct{}{},
		_subscribe:   make(chan *Channel),
		_unsubscribe: make(chan string),
		_disconnect:  make(chan bool),
		Channels:     make([]*Channel, 0),
	}
	go client.runLoop()
	return client
}
func (self *Client) Disconnect() {
	self._disconnect <- true
}
func (self *Client) Subscribe(channel string) (ch *Channel) {
	for _, ch := range self.Channels {
		if ch.Name == channel {
			self._subscribe <- ch
			return ch
		}
	}
	ch = &Channel{Name: channel, bindings: &self.bindings}
	self._subscribe <- ch
	return
}