Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection interface {
ID() string
}
type WsCloseHandler ¶
type WsCloseHandler struct { WsHandler // contains filtered or unexported fields }
func NewWsCloseHandler ¶
func NewWsCloseHandler(handlerFunction func(connection *WsConnection) error) *WsCloseHandler
func (*WsCloseHandler) Call ¶
func (h *WsCloseHandler) Call(args ...any) error
type WsConnection ¶
type WsConnection struct {
// contains filtered or unexported fields
}
func NewWsConnection ¶
func NewWsConnection(conn *websocket.Conn) *WsConnection
func (*WsConnection) Close ¶
func (c *WsConnection) Close() error
func (*WsConnection) Conn ¶
func (c *WsConnection) Conn() *websocket.Conn
func (*WsConnection) ID ¶
func (c *WsConnection) ID() string
type WsConnectionHandler ¶
type WsConnectionHandler struct { WsHandler // contains filtered or unexported fields }
func NewWsConnectionHandler ¶
func NewWsConnectionHandler(handlerFunction func(connection *WsConnection) error) *WsConnectionHandler
func (*WsConnectionHandler) Call ¶
func (h *WsConnectionHandler) Call(args ...any) error
type WsManager ¶
type WsManager struct { Connections connectionList[*WsConnection] OnMessageHandlers handlerList[*WsMessageHandler] OnCloseHandlers handlerList[*WsCloseHandler] OnConnectionHandlers handlerList[*WsConnectionHandler] // contains filtered or unexported fields }
func NewWsManager ¶
func NewWsManager() *WsManager
func (*WsManager) WebsocketEndpointHandler ¶
func (s *WsManager) WebsocketEndpointHandler(w http.ResponseWriter, r *http.Request)
type WsMessageHandler ¶
type WsMessageHandler struct { WsHandler // contains filtered or unexported fields }
func NewWsMessageHandler ¶
func NewWsMessageHandler(handlerFunction func(connection *WsConnection, message []byte) error) *WsMessageHandler
func (*WsMessageHandler) Call ¶
func (h *WsMessageHandler) Call(args ...any) error
Click to show internal directories.
Click to hide internal directories.