|
|
@ -367,6 +367,7 @@ func (s *ClientSession) doMsg(stream *Stream) error {
|
|
|
|
nazalog.Warnf("[%s] read user control message, ignore. buf=%s",
|
|
|
|
nazalog.Warnf("[%s] read user control message, ignore. buf=%s",
|
|
|
|
s.uniqueKey, hex.Dump(stream.msg.buff.Peek(32)))
|
|
|
|
s.uniqueKey, hex.Dump(stream.msg.buff.Peek(32)))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
s.doUserControl(stream)
|
|
|
|
case base.RtmpTypeIdAudio:
|
|
|
|
case base.RtmpTypeIdAudio:
|
|
|
|
fallthrough
|
|
|
|
fallthrough
|
|
|
|
case base.RtmpTypeIdVideo:
|
|
|
|
case base.RtmpTypeIdVideo:
|
|
|
@ -383,6 +384,15 @@ func (s *ClientSession) doAck(stream *Stream) error {
|
|
|
|
nazalog.Infof("[%s] < R Acknowledgement. ignore. sequence number=%d.", s.uniqueKey, seqNum)
|
|
|
|
nazalog.Infof("[%s] < R Acknowledgement. ignore. sequence number=%d.", s.uniqueKey, seqNum)
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ClientSession) doUserControl(stream *Stream) error {
|
|
|
|
|
|
|
|
userControlType := bele.BeUint16(stream.msg.buff.Bytes())
|
|
|
|
|
|
|
|
if userControlType == uint16(base.RtmpUserControlPingRequest) {
|
|
|
|
|
|
|
|
stream.msg.buff.Skip(2)
|
|
|
|
|
|
|
|
timeStamp := bele.BeUint32(stream.msg.buff.Bytes())
|
|
|
|
|
|
|
|
s.packer.writePingResponse(s.conn, timeStamp)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *ClientSession) doDataMessageAmf0(stream *Stream) error {
|
|
|
|
func (s *ClientSession) doDataMessageAmf0(stream *Stream) error {
|
|
|
|
val, err := stream.msg.peekStringWithType()
|
|
|
|
val, err := stream.msg.peekStringWithType()
|
|
|
|