// Reads the next chunk header + data
Reads the next chunk header + data
// Reads the next chunk header + data
func (m *MessageManager) nextMessage() error {
	var err error
	chunkHeader, _, err := m.chunkHandler.ReadChunkHeader()
	if err != nil {
		return err
	}
	payload, _, err := m.chunkHandler.ReadChunkData(chunkHeader)
	if err != nil {
		return err
	}
	return m.interpretMessage(chunkHeader, payload)
}
func ( m * MessageManager ) nextMessage ( ) error { var err error chunkHeader , _ , err := m . chunkHandler . ReadChunkHeader ( ) if err != nil { return err } payload , _ , err := m . chunkHandler . ReadChunkData ( chunkHeader ) if err != nil { return err } return m . interpretMessage ( chunkHeader , payload ) }
Reads the next chunk header + data
Reads the next chunk header + data
// TODO: every time a chunk is read, update the number of read bytes