wstrafficker

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WSTrafficker

type WSTrafficker struct {
	Chans struct {
		Send    chan []byte
		Receive chan []byte
	}
	Client   *websocket.Conn
	Hostname string
}

func NewWSTrafficker

func NewWSTrafficker(client *websocket.Conn) *WSTrafficker

func (*WSTrafficker) Write

func (ws *WSTrafficker) Write(messageType int, payload []byte) error

type WSTraffickers

type WSTraffickers struct {
	ByAccessTokenHostname map[string]*WSTrafficker
}

func NewWSTraffickers

func NewWSTraffickers() *WSTraffickers

func (*WSTraffickers) DeleteConnection

func (wss *WSTraffickers) DeleteConnection(accessToken, hostname string) error

func (*WSTraffickers) GetConnectionByAccessTokenHostname

func (wss *WSTraffickers) GetConnectionByAccessTokenHostname(accessToken, hostname string) *WSTrafficker

func (*WSTraffickers) SaveConnection

func (wss *WSTraffickers) SaveConnection(accessToken string, conn *websocket.Conn) (*WSTrafficker, error)

Jump to

Keyboard shortcuts

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