websocket

package
v3.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2018 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

This section is empty.

Functions

func Dial

Dial dials a WebSocket connection to the given destination.

func ListenWS

func ListenWS(ctx context.Context, address net.Address, port net.Port, addConn internet.ConnHandler) (internet.Listener, error)

Types

type Config

type Config struct {
	// URL path to the WebSocket service. Empty value means root(/).
	Path   string    `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"`
	Header []*Header `protobuf:"bytes,3,rep,name=header" json:"header,omitempty"`
}

func (*Config) Descriptor

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

func (*Config) GetHeader

func (m *Config) GetHeader() []*Header

func (*Config) GetNormailzedPath

func (c *Config) GetNormailzedPath() string

func (*Config) GetPath

func (m *Config) GetPath() string

func (*Config) GetRequestHeader

func (c *Config) GetRequestHeader() http.Header

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) String

func (m *Config) String() string
type Header struct {
	Key   string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}

func (*Header) Descriptor

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

func (*Header) GetKey

func (m *Header) GetKey() string

func (*Header) GetValue

func (m *Header) GetValue() string

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) Reset

func (m *Header) Reset()

func (*Header) String

func (m *Header) String() string

type Listener

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

func (*Listener) Addr

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

Addr implements net.Listener.Addr().

func (*Listener) Close

func (ln *Listener) Close() error

Close implements net.Listener.Close().

Jump to

Keyboard shortcuts

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