Versions in this module Expand all Collapse all v0 v0.0.2 Mar 11, 2023 Changes in this version + type CMD string + const CMD_ACTIVITY_BANNER_UPDATE_V2 + const CMD_ANCHOR_LOT_AWARD + const CMD_ANCHOR_LOT_END + const CMD_ANCHOR_LOT_START + const CMD_COMBO_SEND + const CMD_DANMU_MSG + const CMD_ENTRY_EFFECT + const CMD_GUARD_BUY + const CMD_NOTICE_MSG + const CMD_ROOM_REAL_TIME_MESSAGE_UPDATE + const CMD_SEND_GIFT + const CMD_SUPER_CHAT_MESSAGE + const CMD_SUPER_CHAT_MESSAGE_JPN + const CMD_USER_TOAST_MSG + const CMD_WELCOME + const CMD_WELCOME_GUARD + type Client struct + Conn *websocket.Conn + RoomID int + func NewClient(roomid int) *Client + func (c *Client) Close() (err error) + func (c *Client) Connect() (err error) + func (c *Client) ReadPackets() (pkts []*Packet, err error) + func (c *Client) WritePacket(pkt Packet) (err error) + type EnterRoom struct + ClientVer *string + Platform *string + ProtoVer *int + RoomID int + Type *int + UID *int + type Message struct + CMD CMD + type OpreationType uint32 + const OpreationConnectSuccess + const OpreationHeartbeat + const OpreationHeartbeatReply + const OpreationMessage + const OpreationUserAuthentication + type Packet struct + Body []byte + HeaderLength uint16 + Operation OpreationType + PacketLength uint32 + ProtocolVersion ProtocolVersion + SequenceID uint32 + func DecodeHeader(h []byte) (pkt *Packet) + func DecodePackets(body []byte) (pkts []*Packet, err error) + func NewConnectPacket(roomid int) Packet + func NewJSONPacket(body []byte) (pkt Packet) + func NewPingPacket() Packet + func (pkt *Packet) Bytes() (h []byte) + func (pkt *Packet) Decode() (npkt *Packet, err error) + func (pkt *Packet) Header() (h []byte) + type ProtocolVersion uint16 + const ProtocolBrotliBuffer + const ProtocolInflateBuffer + const ProtocolInt32BigEndian + const ProtocolNormalBuffer