danmaku

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

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

Constants

View Source
const BilibiliWebSocketMessageType = websocket.MessageBinary

BilibiliWebSocketMessageType Bilibili uses only binary WebSocket messages

Variables

This section is empty.

Functions

This section is empty.

Types

type DanmakuClient

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

func NewClient added in v0.5.0

func NewClient(ctx context.Context, ws *websocket.Conn) DanmakuClient

func (*DanmakuClient) Authenticate

func (d *DanmakuClient) Authenticate(roomId types.RoomId, authKey, buvid3 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

Directories

Path Synopsis
This file implements the auth exchange.
This file implements the auth exchange.

Jump to

Keyboard shortcuts

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