conn

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialWebSocket

func DialWebSocket(url string) (conn.Connection, error)

DialWebSocket is a ConnectFunc that creates a WebSocket connection.

Types

type WebSocketConnection

type WebSocketConnection struct {
	// contains filtered or unexported fields
}

func NewWebSocketConnection

func NewWebSocketConnection(c *websocket.Conn) *WebSocketConnection

func (*WebSocketConnection) Close

func (w *WebSocketConnection) Close() error

func (*WebSocketConnection) IsUnexpectedCloseError

func (w *WebSocketConnection) IsUnexpectedCloseError(err error) bool

func (*WebSocketConnection) IsValid

func (w *WebSocketConnection) IsValid() bool

func (*WebSocketConnection) ReadMessage

func (w *WebSocketConnection) ReadMessage() ([]byte, error)

func (*WebSocketConnection) WriteMessage

func (w *WebSocketConnection) WriteMessage(data []byte) error

Jump to

Keyboard shortcuts

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