wspb

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package wspb provides helpers for reading and writing protobuf messages. Adapted from: https://github.com/nhooyr/websocket/blob/master/wspb/wspb.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(ctx context.Context, c *websocket.Conn, v proto.Message) error

Read reads a protobuf message from c into v. It will reuse buffers in between calls to avoid allocations.

func Write

func Write(ctx context.Context, c *websocket.Conn, v proto.Message) error

Write writes the protobuf message v to c. It will reuse buffers in between calls to avoid allocations.

Types

This section is empty.

Jump to

Keyboard shortcuts

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