wsconnadaptertest

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package wsconnadaptertest connects a wsconnadapter.Adapter to a WebSocket peer over an in-memory pipe, so a test can drive the adapter's keep-alive inside a testing/synctest bubble without a socket or the real clock.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPair

func NewPair(t *testing.T, options ...wsconnadapter.Option) (*wsconnadapter.Adapter, *websocket.Conn)

NewPair upgrades one end of a pipe into an wsconnadapter.Adapter built with options, the end the server holds, and returns it with the raw WebSocket at the other end, the end the agent holds. Neither end reads until the caller does, and both are closed when t ends.

Types

This section is empty.

Jump to

Keyboard shortcuts

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