Documentation ¶
Index ¶
Constants ¶
View Source
const ( WS_OP_HEARTBEAT = 2 WS_OP_HEARTBEAT_REPLY = 3 WS_OP_MESSAGE = 5 WS_OP_USER_AUTHENTICATION = 7 WS_OP_CONNECT_SUCCESS = 8 WS_PACKAGE_HEADER_TOTAL_LENGTH = 16 WS_PACKAGE_OFFSET = 0 WS_HEADER_OFFSET = 4 WS_VERSION_OFFSET = 6 WS_OPERATION_OFFSET = 8 WS_SEQUENCE_OFFSET = 12 WS_BODY_PROTOCOL_VERSION_NORMAL = 0 WS_BODY_PROTOCOL_VERSION_DEFLATE = 2 WS_BODY_PROTOCOL_VERSION_BROTLI = 3 WS_HEADER_DEFAULT_VERSION = 1 WS_HEADER_DEFAULT_OPERATION = 1 WS_HEADER_DEFAULT_SEQUENCE = 1 WS_AUTH_OK = 0 WS_AUTH_TOKEN_ERROR = -101 )
View Source
const ( Protover = 3 Platform = "web" Type = 2 )
Variables ¶
View Source
var C = new(Common).Init()
Functions ¶
This section is empty.
Types ¶
type Common ¶ added in v0.5.10
type Common struct { PID int //进程id Uid int //client uid Live []LiveQn //直播流链接 Live_qn int //当前直播流质量 Live_want_qn int //期望直播流质量 Roomid int //房间ID Cookie syncmap.Map //Cookie Title string //直播标题 Uname string //主播名 UpUid int //主播uid Rev float64 //营收 Renqi int //人气 Watched int //观看人数 OnlineNum int //在线人数 GuardNum int //舰长数 ParentAreaID int //父分区 AreaID int //子分区 Locked bool //直播间封禁 Note string //分区排行 Live_Start_Time time.Time //直播开始时间 Liveing bool //是否在直播 Wearing_FansMedal int //当前佩戴的粉丝牌 Token string //弹幕钥 WSURL []string //弹幕链接 LiveBuvidUpdated time.Time //LIVE_BUVID更新时间 Stream_url *url.URL //直播Web服务 Proxy string //全局代理 AcceptQn map[int]string //允许的直播流质量 Qn map[int]string //全部直播流质量 StreamType StreamType //当前直播流类型 AllStreamType map[string]StreamType //直播流类型 K_v syncmap.Map //配置文件 Log *log.Log_interface //日志 Danmu_Main_mq *mq.Msgq //消息 ReqPool *pool.Buf[reqf.Req] //请求池 SerF *web.WebPath //web服务处理 StartT time.Time //启动时间 }
func (*Common) DisableLive ¶ added in v0.5.11
func (*Common) DisableLiveAuto ¶ added in v0.6.1
自动停用机制
type LiveQn ¶ added in v0.5.11
type ResStruct ¶ added in v0.6.2
type ResStruct struct { Code int `json:"code"` Message string `json:"message"` Data any `json:"data"` }
Web服务响应格式
func (ResStruct) Write ¶ added in v0.6.2
func (t ResStruct) Write(w http.ResponseWriter)
type StreamType ¶ added in v0.5.11
Click to show internal directories.
Click to hide internal directories.