// EstablishWS will create a websocket connection.
EstablishWS will create a websocket connection.
// EstablishWS will create a websocket connection .
func (c *Client) EstablishWS(path string) (*websocket.Conn, error) {
	prot := "ws"
	if c.UseHTTPS {
		prot = "wss"
	}
	host := fmt.Sprintf("%s:%d", c.APIHost, c.APIPort)
	uri := url.URL{
		Scheme: prot,
		Host:   host,
		Path:   path,
	}
	dialer := &websocket.Dialer{
		HandshakeTimeout: c.Config.Timeout,
	}
	conn, _, err := dialer.Dial(uri.String(), nil)
	return conn, err
}
func ( c * Client ) EstablishWS ( path string ) ( * websocket . Conn , error ) { prot := " " if c . UseHTTPS { prot = " " } host := fmt . Sprintf ( " " , c . APIHost , c . APIPort ) uri := url . URL { Scheme : prot , Host : host , Path : path , } dialer := & websocket . Dialer { HandshakeTimeout : c . Config . Timeout , } conn , _ , err := dialer . Dial ( uri . String ( ) , nil ) return conn , err }
EstablishWS will create a websocket connection.
EstablishWS will create a websocket connection .