Documentation
¶
Overview ¶
Package testutil provides testing utilities for websocket functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertHTTPToWS ¶
ConvertHTTPToWS converts an HTTP(S) URL to its WebSocket (ws:// or wss://) equivalent.
Types ¶
type MockWebSocketServer ¶
MockWebSocketServer is a test utility for simulating a WebSocket server and capturing sent messages.
func (*MockWebSocketServer) TestWebSocketServer ¶
func (ms *MockWebSocketServer) TestWebSocketServer(writeFunc connFn) *httptest.Server
TestWebSocketServer starts an HTTP test server that upgrades requests to WebSocket and invokes writeFunc.
Click to show internal directories.
Click to hide internal directories.