Fix Poke timeout, input CommandLow handling, and add Poke Popup
All checks were successful
Build and Release / build-linux (push) Successful in 35s
Build and Release / build-windows (push) Successful in 2m35s
Build and Release / release (push) Has been skipped

This commit is contained in:
Jose Luis Montañes Ojados
2026-01-17 15:57:34 +01:00
parent 99f26c4485
commit 356b492629
5 changed files with 147 additions and 34 deletions

View File

@@ -36,6 +36,7 @@ type Client struct {
PingPacketID uint16 // Type 0x04
PongPacketID uint16 // Type 0x05
AckPacketID uint16 // Type 0x06
AckLowPacketID uint16 // Type 0x07
// Ping RTT tracking
PingSentTimes map[uint16]time.Time // Map PingPacketID -> Time sent
@@ -48,10 +49,14 @@ type Client struct {
ServerName string
// Fragment reassembly (packet queue like ts3j)
CommandQueue map[uint16]*protocol.Packet // Packets waiting for reassembly
ExpectedCommandPID uint16 // Next expected packet ID
CommandQueue map[uint16]*protocol.Packet // Packets waiting for reassembly (Type 0x02)
ExpectedCommandPID uint16 // Next expected packet ID (Type 0x02)
FragmentState bool // Toggle: true = collecting, false = ready
CommandLowQueue map[uint16]*protocol.Packet // Packets waiting for reassembly (Type 0x03)
ExpectedCommandLowPID uint16 // Next expected packet ID (Type 0x03)
FragmentStateLow bool // Toggle: true = collecting, false = ready
// Server Data
Channels map[uint64]*Channel
@@ -69,17 +74,20 @@ type Client struct {
func NewClient(nickname string) *Client {
return &Client{
Nickname: nickname,
PacketIDCounterC2S: 1,
VoicePacketID: 1,
Channels: make(map[uint64]*Channel),
VoiceDecoders: make(map[uint16]*opus.Decoder),
CommandQueue: make(map[uint16]*protocol.Packet),
ExpectedCommandPID: 0,
PingSentTimes: make(map[uint16]time.Time),
PingRTT: 0,
PingDeviation: 0,
done: make(chan struct{}),
Nickname: nickname,
PacketIDCounterC2S: 1,
AckLowPacketID: 1,
VoicePacketID: 1,
Channels: make(map[uint64]*Channel),
VoiceDecoders: make(map[uint16]*opus.Decoder),
CommandQueue: make(map[uint16]*protocol.Packet),
ExpectedCommandPID: 0,
CommandLowQueue: make(map[uint16]*protocol.Packet),
ExpectedCommandLowPID: 0,
PingSentTimes: make(map[uint16]time.Time),
PingRTT: 0,
PingDeviation: 0,
done: make(chan struct{}),
}
}