client

package
v0.12.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2016 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Websocket client implementation. This will be used in tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WSClient

type WSClient struct {
	// contains filtered or unexported fields
}

A websocket client subscribes and unsubscribes to events

func NewWSClient

func NewWSClient(addr string) *WSClient

create a new connection

func (*WSClient) Close

func (this *WSClient) Close()

func (*WSClient) Dial

func (this *WSClient) Dial() (*http.Response, error)

func (*WSClient) StartRead

func (this *WSClient) StartRead() <-chan []byte

returns a channel from which messages can be pulled from a go routine that reads the socket. if the ws returns an error (eg. closes), we return

func (*WSClient) WriteMsg

func (this *WSClient) WriteMsg(msg []byte)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL