Add Header() method to Packet

Simplifies the API. Unmarshal can now return one Packet value instead
of both a packet and a header.

Relates to #119
This commit is contained in:
Max Hawkins
2018-12-02 12:01:11 -08:00
committed by Woodrow Douglass
parent 5655d151b1
commit 0ef6602adb
9 changed files with 167 additions and 70 deletions

View File

@@ -2,6 +2,8 @@ package rtcp
// Packet represents an RTCP packet, a protocol used for out-of-band statistics and control information for an RTP session
type Packet interface {
Header() Header
Marshal() ([]byte, error)
Unmarshal(rawPacket []byte) error
}