websocketclient

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2016 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	WebsocketUri      string
	WebsocketProtocol string
	WebsocketOrigin   string
	// contains filtered or unexported fields
}

A websocket client meant to be used with the 1password

func NewClient

func NewClient(websocketUri string, websocketProtocol string, websocketOrigin string) *Client

func NewCustomClient

func NewCustomClient(websocketUri string, websocketProtocol string, websocketOrigin string,
	dial func(string, string, string) (*ws.Conn, error), codec Codec) *Client

func (*Client) Connect

func (client *Client) Connect() error

func (*Client) Receive

func (client *Client) Receive(v interface{}) error

func (*Client) Send

func (client *Client) Send(v interface{}) error

type Codec

type Codec interface {
	Receive(*ws.Conn, interface{}) error
	Send(*ws.Conn, interface{}) error
}

Jump to

Keyboard shortcuts

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