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.
Click to show internal directories.
Click to hide internal directories.