websocket

package
v2.19.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2017 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package websocket implements Websocket transport

Websocket transport implements a HTTP(S) compliable, surveillance proof transport method with plausible deniability.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClosedListener = errors.New("Listener is closed.")
)

Functions

func Dial

func ListenWS

func ListenWS(address v2net.Address, port v2net.Port, options internet.ListenOptions) (internet.Listener, error)

Types

type Config

type Config struct {
	// Whether or not to reuse WebSocket connections.
	ConnectionReuse *ConnectionReuse `protobuf:"bytes,1,opt,name=connection_reuse,json=connectionReuse" json:"connection_reuse,omitempty"`
	// URL path to the WebSocket service. Empty value means root(/).
	Path string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"`
}

func (*Config) Descriptor

func (*Config) Descriptor() ([]byte, []int)

func (*Config) GetConnectionReuse

func (m *Config) GetConnectionReuse() *ConnectionReuse

func (*Config) GetNormailzedPath

func (c *Config) GetNormailzedPath() string

func (*Config) GetPath

func (m *Config) GetPath() string

func (*Config) IsConnectionReuse

func (c *Config) IsConnectionReuse() bool

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) String

func (m *Config) String() string

type ConnectionReuse

type ConnectionReuse struct {
	Enable bool `protobuf:"varint,1,opt,name=enable" json:"enable,omitempty"`
}

func (*ConnectionReuse) Descriptor

func (*ConnectionReuse) Descriptor() ([]byte, []int)

func (*ConnectionReuse) GetEnable

func (m *ConnectionReuse) GetEnable() bool

func (*ConnectionReuse) ProtoMessage

func (*ConnectionReuse) ProtoMessage()

func (*ConnectionReuse) Reset

func (m *ConnectionReuse) Reset()

func (*ConnectionReuse) String

func (m *ConnectionReuse) String() string

type ConnectionWithError

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

type Listener

type Listener struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*Listener) Accept

func (ln *Listener) Accept() (internet.Connection, error)

func (*Listener) Addr

func (ln *Listener) Addr() net.Addr

func (*Listener) Close

func (ln *Listener) Close() error

func (*Listener) Put

func (ln *Listener) Put(id internal.ConnectionID, conn net.Conn)

Jump to

Keyboard shortcuts

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