Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientHandler ¶
func PrintStats ¶
func PrintStats()
PrintStats periodically logs messaging and connection statistics
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements ClientInterface
func (*Client) ClientInfo ¶
func (*Client) CloseClient ¶
func (c *Client) CloseClient()
func (*Client) SendMessage ¶
func (c *Client) SendMessage(msg interface{})
Implement `ClientInterface` methods SendMessage sends a message directly to the WebSocket
type ConnectionManager ¶
type ConnectionManager struct {
// contains filtered or unexported fields
}
ConnectionManager tracks connections and memory usage
func (*ConnectionManager) GetConnectionCount ¶
func (cm *ConnectionManager) GetConnectionCount() int
GetConnectionCount returns the current number of connections
func (*ConnectionManager) GetMemoryStats ¶
func (cm *ConnectionManager) GetMemoryStats() map[string]interface{}
GetMemoryStats returns memory statistics for monitoring
func (*ConnectionManager) RegisterConnection ¶
func (cm *ConnectionManager) RegisterConnection(client *Client)
RegisterConnection adds a connection to the manager
func (*ConnectionManager) RemoveConnection ¶
func (cm *ConnectionManager) RemoveConnection(client *Client)
RemoveConnection removes a connection from tracking
Click to show internal directories.
Click to hide internal directories.