Versions in this module Expand all Collapse all v0 v0.2.0 Apr 23, 2022 Changes in this version + const WsBodyProtocolVersionBrotli + const WsBodyProtocolVersionNormal + const WsBodyProtocolVersionZlib + const WsOpConnectSuccess + const WsOpHeartbeat + const WsOpHeartbeatReply + const WsOpMessage + const WsOpUserAuthentication + type API struct + func NewAPI(base *base.Base) *API + func (a *API) WebRoomInfo(opt WebRoomInfoOpt) (*WebRoomInfoResp, error) + type Config struct + AuthInfo UserAuth + CookieJar http.CookieJar + Dialer *websocket.Dialer + Header http.Header + HeartBeatInterval time.Duration + HostList []LiveHost + Log base.BaseLogger + MsgCap int + NoSecure bool + ReadHeartbeatReply bool + UserAgent string + type Live struct + func NewLive(ctx context.Context, cfg Config) (*Live, error) + func (l *Live) Close() + func (l *Live) ReadWsMsg(ctx context.Context) (WsSubMsg, error) + type LiveHost struct + Host string + Port int + WsPort int + WssPort int + type UserAuth struct + Key string + Platform string + ProtoVer int + RoomID int64 + Type int + UID int64 + type WebRoomInfoOpt struct + ID int64 + Type int + type WebRoomInfoResp struct + BusinessID int + Group string + HostList []LiveHost + MaxDelay int + RefreshRate int + RefreshRowFactor float64 + Token string + type WsSubMsg struct + Body []byte + Cmd string + Op uint32 + Ver uint16 + type WsSubPkt []byte + func NewWsSubPkt(ver uint16, op uint32, payload []byte) WsSubPkt + func ReadWsSubPkt(r io.Reader) (WsSubPkt, error) + func (m WsSubPkt) Body() []byte + func (m WsSubPkt) HdrLen() uint16 + func (m WsSubPkt) Operation() uint32 + func (m WsSubPkt) PktLen() uint32 + func (m WsSubPkt) Sequence() uint32 + func (m WsSubPkt) Version() uint16