(stream *Stream)
| 611 | return nil |
| 612 | } |
| 613 | func (s *ClientSession) doProtocolControlMessage(stream *Stream) error { |
| 614 | if stream.msg.Len() < 4 { |
| 615 | return base.NewErrRtmpShortBuffer(4, int(stream.msg.Len()), "ClientSession::doProtocolControlMessage") |
| 616 | } |
| 617 | val := int(bele.BeUint32(stream.msg.buff.Bytes())) |
| 618 | |
| 619 | switch stream.header.MsgTypeId { |
| 620 | case base.RtmpTypeIdWinAckSize: |
| 621 | s.option.PeerWinAckSize = val |
| 622 | Log.Infof("[%s] < R Window Acknowledgement Size: %d", s.UniqueKey(), s.option.PeerWinAckSize) |
| 623 | case base.RtmpTypeIdBandwidth: |
| 624 | // TODO chef: 是否需要关注这个信令 |
| 625 | Log.Warnf("[%s] < R Set Peer Bandwidth. ignore.", s.UniqueKey()) |
| 626 | case base.RtmpTypeIdSetChunkSize: |
| 627 | // composer内部会自动更新peer chunk size. |
| 628 | Log.Infof("[%s] < R Set Chunk Size %d.", s.UniqueKey(), val) |
| 629 | default: |
| 630 | Log.Errorf("[%s] read unknown protocol control message. typeid=%d, %s", s.UniqueKey(), stream.header.MsgTypeId, stream.toDebugString()) |
| 631 | } |
| 632 | return nil |
| 633 | } |
| 634 | |
| 635 | func (s *ClientSession) writeAcknowledgementIfNeeded(stream *Stream) error { |
| 636 | // https://github.com/q191201771/lal/pull/154 |
no test coverage detected