Documentation ¶
Index ¶
- Variables
- func NewWebSocket(gctx global.Context, conn *websocket.Conn) (client.Connection, error)
- type WebSocket
- func (*WebSocket) Actor() *structures.User
- func (w *WebSocket) Buffer() client.EventBuffer
- func (w *WebSocket) Cache() client.Cache
- func (w *WebSocket) Context() context.Context
- func (w *WebSocket) Destroy(gctx global.Context)
- func (w *WebSocket) Events() *client.EventMap
- func (w *WebSocket) ForceClose()
- func (w *WebSocket) Greet(gctx global.Context) error
- func (w *WebSocket) Handler() client.Handler
- func (w *WebSocket) OnClose() <-chan struct{}
- func (w *WebSocket) OnReady() <-chan struct{}
- func (w *WebSocket) Read(gctx global.Context)
- func (w *WebSocket) SendAck(cmd events.Opcode, data json.RawMessage) error
- func (w *WebSocket) SendClose(code events.CloseCode, after time.Duration)
- func (w *WebSocket) SendError(txt string, fields map[string]any)
- func (w *WebSocket) SendHeartbeat() error
- func (w *WebSocket) SessionID() string
- func (w *WebSocket) SetReady()
- func (*WebSocket) SetWriter(w *bufio.Writer, f http.Flusher)
- func (w *WebSocket) Transport() client.Transport
- func (w *WebSocket) Write(msg events.Message[json.RawMessage]) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ResumableCloseCodes = []int{ websocket.CloseNormalClosure, websocket.CloseGoingAway, websocket.CloseAbnormalClosure, int(events.CloseCodeTimeout), int(events.OpcodeReconnect), }
Functions ¶
func NewWebSocket ¶
Types ¶
type WebSocket ¶
type WebSocket struct {
// contains filtered or unexported fields
}
func (*WebSocket) Buffer ¶
func (w *WebSocket) Buffer() client.EventBuffer
Buffer implements client.Connection
func (*WebSocket) ForceClose ¶
func (w *WebSocket) ForceClose()
func (*WebSocket) SendHeartbeat ¶
Click to show internal directories.
Click to hide internal directories.