Documentation
¶
Overview ¶
Package main provides a simple WebSocket client that connects to a WebSocket server, optionally authenticating using basic authentication if credentials are embedded in the URL. The client supports sending messages from the command line and receiving messages from the server concurrently.
Usage:
go run main.go <WebSocket_URL>
The URL can include username and password for basic authentication, for example:
ws://user:password@localhost:8080/ws
The program also listens for system signals (e.g., SIGINT, SIGTERM) to gracefully shut down the WebSocket connection.
Functions:
Click to show internal directories.
Click to hide internal directories.