client

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2017 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// The network exception or the server shutdown caused the session to be closed.
	ErrClosed = errors.New("session closed")
)

Error constants

Functions

This section is empty.

Types

type Client

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

Client connects to the server through the Dial function. Multiple proxies can be established with the server.

func Dial

func Dial(addr string) (c *Client, err error)

Dial returns a client that establishes a session with addr.

func (*Client) IsClosed added in v0.1.2

func (c *Client) IsClosed() bool

IsClosed to determine whether this client was closed.

func (*Client) Proxy

func (c *Client) Proxy(id, token, addr string) (err error)

Proxy establishes a proxy with the server.

func (*Client) Run

func (c *Client) Run(ctx context.Context) (err error)

Run client handles many user requests that are forwarded over the server.

Jump to

Keyboard shortcuts

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