package wstest
import "nhooyr.io/websocket/internal/test/wstest"
Index ¶
- func Echo(ctx context.Context, c *websocket.Conn, max int) error
- func EchoLoop(ctx context.Context, c *websocket.Conn) error
- func Pipe(dialOpts *websocket.DialOptions, acceptOpts *websocket.AcceptOptions) (clientConn, serverConn *websocket.Conn)
Functions ¶
func Echo ¶
Echo writes a message and ensures the same is sent back on c.
func EchoLoop ¶
EchoLoop echos every msg received from c until an error occurs or the context expires. The read limit is set to 1 << 30.
func Pipe ¶
func Pipe(dialOpts *websocket.DialOptions, acceptOpts *websocket.AcceptOptions) (clientConn, serverConn *websocket.Conn)
Pipe is used to create an in memory connection between two websockets analogous to net.Pipe.
Source Files ¶
echo.go pipe.go
- Version
- v1.8.17 (latest)
- Published
- Aug 10, 2024
- Platform
- linux/amd64
- Imports
- 12 packages
- Last checked
- 1 hour ago –
Tools for package owners.