package wstest

import "github.com/coder/websocket/internal/test/wstest"

Index

Functions

func Echo

func Echo(ctx context.Context, c *websocket.Conn, max int) error

Echo writes a message and ensures the same is sent back on c.

func EchoLoop

func EchoLoop(ctx context.Context, c *websocket.Conn) error

EchoLoop echos every msg received from c until an error occurs or the context expires. The read limit is set to 1 << 30.

Source Files

echo.go

Version
v1.8.12
Published
Aug 9, 2024
Platform
js/wasm
Imports
8 packages
Last checked
12 hours ago

Tools for package owners.