Documentation ¶
Overview ¶
This file implements the background WebSocket messaging channel in Bilibili webui. Server send livestream start and stop messages via this channel. Note: In this file we manage the concrete WebSocket connection. The Bilibili WebSocket channel protocol is decoupled and implemented in package `dmpkg`.
Index ¶
- type DanmakuClient
- func (d *DanmakuClient) Authenticate(roomId common.RoomId, authKey string) error
- func (d *DanmakuClient) Connect(ctx context.Context, url string) error
- func (d *DanmakuClient) Disconnect() error
- func (d *DanmakuClient) Heartbeat() error
- func (d *DanmakuClient) ReadExchange() (dmpkg.DanmakuExchange, error)
- type DanmakuMessageType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DanmakuClient ¶
type DanmakuClient struct {
// contains filtered or unexported fields
}
func NewDanmakuClient ¶
func NewDanmakuClient() DanmakuClient
func (*DanmakuClient) Authenticate ¶
func (d *DanmakuClient) Authenticate(roomId common.RoomId, authKey string) error
func (*DanmakuClient) Connect ¶
func (d *DanmakuClient) Connect(ctx context.Context, url string) error
func (*DanmakuClient) Disconnect ¶
func (d *DanmakuClient) Disconnect() error
func (*DanmakuClient) Heartbeat ¶
func (d *DanmakuClient) Heartbeat() error
func (*DanmakuClient) ReadExchange ¶
func (d *DanmakuClient) ReadExchange() (dmpkg.DanmakuExchange, error)
ReadExchange read and decode some kind of exchanges which we are interested
type DanmakuMessageType ¶
type DanmakuMessageType int
Click to show internal directories.
Click to hide internal directories.