grpcwebsocket

package
v0.2.18 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SubprotocolName is the subprotocol for gRPC-websocket specified in the Sec-Websocket-Protocol
	// header.
	SubprotocolName = "grpc-ws"
)

Variables

This section is empty.

Functions

func Write

func Write(ctx context.Context, conn *websocket.Conn, r io.Reader, sender string) error

Write the contents of the reader along the WebSocket connection. This is done by sending each WebSocket message as a gRPC message frame. Each message frame is length-prefixed message, where the prefix is 5 bytes. gRPC request format is specified here: https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md.

Types

This section is empty.

Jump to

Keyboard shortcuts

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