wsjson

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: MIT, ISC Imports: 7 Imported by: 0

Documentation

Overview

Package wsjson provides helpers for reading and writing JSON messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadJSON

func ReadJSON(ctx context.Context, c *websocket.Conn, v any) error

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

func WriteJSON

func WriteJSON(ctx context.Context, c *websocket.Conn, v any) error

WriteJSON writes the JSON 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