websocket

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Type       string      `json:"type"`
	Payload    interface{} `json:"payload,omitempty"`
	APIVersion string      `json:"api_version,omitempty"`
	RequestID  string      `json:"request_id,omitempty"`
	Timestamp  int64       `json:"timestamp,omitempty"`
	Error      string      `json:"error,omitempty"`
}

Protocol structure for bidirectional client communication

type WebSocketServer

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

Enables real-time speech-to-text API for external clients

func NewWebSocketServer

func NewWebSocketServer(config *config.Config, recorder interfaces.AudioRecorder, whisperEngine *whisper.WhisperEngine, logger logger.Logger) *WebSocketServer

Initialize server with security and resource constraints

func (*WebSocketServer) BroadcastMessage

func (s *WebSocketServer) BroadcastMessage(messageType string, payload interface{})

Notify all active clients of server-wide events

func (*WebSocketServer) Start

func (s *WebSocketServer) Start() error

Begin accepting client connections with health monitoring

func (*WebSocketServer) Stop

func (s *WebSocketServer) Stop()

Ensure clean client disconnection before termination

Jump to

Keyboard shortcuts

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