v.io: v.io/x/ref/runtime/protocols/lib/websocket Index | Files

package websocket

import "v.io/x/ref/runtime/protocols/lib/websocket"

nolint:golint

Index

Package Files

conn.go listener.go websocket.vdl.go ws.go wsh.go

Variables

var (
    ErrListenerClosed     = verror.NewIDAction("v.io/x/ref/runtime/protocols/lib/websocket.ListenerClosed", verror.NoRetry)
    ErrListenCalledInNaCl = verror.NewIDAction("v.io/x/ref/runtime/protocols/lib/websocket.ListenCalledInNaCl", verror.NoRetry)
)

func ErrorfListenCalledInNaCl Uses

func ErrorfListenCalledInNaCl(ctx *context.T, format string) error

ErrorfListenCalledInNaCl calls ErrListenCalledInNaCl.Errorf with the supplied arguments.

func ErrorfListenerClosed Uses

func ErrorfListenerClosed(ctx *context.T, format string) error

ErrorfListenerClosed calls ErrListenerClosed.Errorf with the supplied arguments.

func MessageListenCalledInNaCl Uses

func MessageListenCalledInNaCl(ctx *context.T, message string) error

MessageListenCalledInNaCl calls ErrListenCalledInNaCl.Message with the supplied arguments.

func MessageListenerClosed Uses

func MessageListenerClosed(ctx *context.T, message string) error

MessageListenerClosed calls ErrListenerClosed.Message with the supplied arguments.

func NewErrListenCalledInNaCl Uses

func NewErrListenCalledInNaCl(ctx *context.T) error

NewErrListenCalledInNaCl returns an error with the ErrListenCalledInNaCl ID. Deprecated: this function will be removed in the future, use ErrorfListenCalledInNaCl or MessageListenCalledInNaCl instead.

func NewErrListenerClosed Uses

func NewErrListenerClosed(ctx *context.T) error

NewErrListenerClosed returns an error with the ErrListenerClosed ID. Deprecated: this function will be removed in the future, use ErrorfListenerClosed or MessageListenerClosed instead.

func ParamsErrListenCalledInNaCl Uses

func ParamsErrListenCalledInNaCl(argumentError error) (verrorComponent string, verrorOperation string, returnErr error)

ParamsErrListenCalledInNaCl extracts the expected parameters from the error's ParameterList.

func ParamsErrListenerClosed Uses

func ParamsErrListenerClosed(argumentError error) (verrorComponent string, verrorOperation string, returnErr error)

ParamsErrListenerClosed extracts the expected parameters from the error's ParameterList.

func WebsocketConn Uses

func WebsocketConn(ws *websocket.Conn) flow.Conn

WebsocketConn provides a flow.Conn interface for a websocket connection. nolint:golint // API change required.

type WS Uses

type WS struct{}

func (WS) Dial Uses

func (WS) Dial(ctx *context.T, protocol, address string, timeout time.Duration) (flow.Conn, error)

func (WS) Listen Uses

func (WS) Listen(ctx *context.T, protocol, address string) (flow.Listener, error)

func (WS) Resolve Uses

func (WS) Resolve(ctx *context.T, protocol, address string) (string, []string, error)

type WSH Uses

type WSH struct{}

func (WSH) Dial Uses

func (WSH) Dial(ctx *context.T, network, address string, timeout time.Duration) (flow.Conn, error)

Dial returns flow.Conn that can be used with a HybridListener but always uses tcp. A client must specifically elect to use websockets by calling websocket.Dialer. The returned net.Conn will report 'tcp' as its Network.

func (WSH) Listen Uses

func (WSH) Listen(ctx *context.T, protocol, address string) (flow.Listener, error)

Listener returns a flow.Conn that supports both tcp and websockets over the same, single, port. A listen address of --v23.tcp.protocol=wsh --v23.tcp.address=127.0.0.1:8101 means that port 8101 can accept connections that use either tcp or websocket. The listener looks at the first 4 bytes of the incoming data stream to decide if it's a websocket protocol or not. These must be 'GET ' for websockets, all other protocols must guarantee to not send 'GET ' as the first four bytes of the payload.

func (WSH) Resolve Uses

func (WSH) Resolve(ctx *context.T, network, address string) (string, []string, error)

Resolve performs a DNS resolution on the network, address and always returns tcp as its Network.

Package websocket imports 14 packages (graph) and is imported by 11 packages. Updated 2020-10-22. Refresh now. Tools for package owners.