Documentation ¶
Index ¶
- Variables
- func ErrorfListenCalledInNaCl(ctx *context.T, format string) error
- func ErrorfListenerClosed(ctx *context.T, format string) error
- func MessageListenCalledInNaCl(ctx *context.T, message string) error
- func MessageListenerClosed(ctx *context.T, message string) error
- func NewErrListenCalledInNaCl(ctx *context.T) error
- func NewErrListenerClosed(ctx *context.T) error
- func ParamsErrListenCalledInNaCl(argumentError error) (verrorComponent string, verrorOperation string, returnErr error)
- func ParamsErrListenerClosed(argumentError error) (verrorComponent string, verrorOperation string, returnErr error)
- func WebsocketConn(ws *websocket.Conn) flow.Conn
- type WS
- type WSH
Constants ¶
This section is empty.
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) )
Functions ¶
func ErrorfListenCalledInNaCl ¶ added in v0.1.10
ErrorfListenCalledInNaCl calls ErrListenCalledInNaCl.Errorf with the supplied arguments.
func ErrorfListenerClosed ¶ added in v0.1.10
ErrorfListenerClosed calls ErrListenerClosed.Errorf with the supplied arguments.
func MessageListenCalledInNaCl ¶ added in v0.1.10
MessageListenCalledInNaCl calls ErrListenCalledInNaCl.Message with the supplied arguments.
func MessageListenerClosed ¶ added in v0.1.10
MessageListenerClosed calls ErrListenerClosed.Message with the supplied arguments.
func NewErrListenCalledInNaCl ¶
NewErrListenCalledInNaCl returns an error with the ErrListenCalledInNaCl ID. Deprecated: this function will be removed in the future, use ErrorfListenCalledInNaCl or MessageListenCalledInNaCl instead.
func NewErrListenerClosed ¶
NewErrListenerClosed returns an error with the ErrListenerClosed ID. Deprecated: this function will be removed in the future, use ErrorfListenerClosed or MessageListenerClosed instead.
func ParamsErrListenCalledInNaCl ¶ added in v0.1.10
func ParamsErrListenCalledInNaCl(argumentError error) (verrorComponent string, verrorOperation string, returnErr error)
ParamsErrListenCalledInNaCl extracts the expected parameters from the error's ParameterList.
Types ¶
type WSH ¶
type WSH struct{}
func (WSH) Dial ¶
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 ¶
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.