mirror of https://bitbucket.org/ausocean/av.git
Fixed packetTypeBytesReadReport case in handlePacket and added debug logging.
This commit is contained in:
parent
35d63f664f
commit
974d9a484b
|
@ -250,17 +250,21 @@ func handlePacket(s *Session, pkt *packet) error {
|
|||
switch pkt.packetType {
|
||||
case packetTypeChunkSize:
|
||||
s.inChunkSize = amf.DecodeInt32(pkt.body[:4])
|
||||
s.log(DebugLevel, pkg+"set inChunkSize", "size", int(s.inChunkSize))
|
||||
|
||||
case packetTypeBytesReadReport:
|
||||
s.serverBW = amf.DecodeInt32(pkt.body[:4])
|
||||
s.log(DebugLevel, pkg+"received packetTypeBytesReadReport")
|
||||
|
||||
case packetTypeServerBW:
|
||||
s.serverBW = amf.DecodeInt32(pkt.body[:4])
|
||||
s.log(DebugLevel, pkg+"set serverBW", "size", int(s.serverBW))
|
||||
|
||||
case packetTypeClientBW:
|
||||
s.clientBW = amf.DecodeInt32(pkt.body[:4])
|
||||
s.log(DebugLevel, pkg+"set clientBW", "size", int(s.clientBW))
|
||||
if pkt.bodySize > 4 {
|
||||
s.clientBW2 = pkt.body[4]
|
||||
s.log(DebugLevel, pkg+"set clientBW2", "size", int(s.clientBW2))
|
||||
} else {
|
||||
s.clientBW2 = 0xff
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue