MCPcopy Create free account
hub / github.com/pion/rtcp / Len

Method Len

source_description.go:290–299  ·  view source on GitHub ↗

Len returns the length of the SourceDescriptionItem when encoded as binary.

()

Source from the content-addressed store, hash-verified

288
289// Len returns the length of the SourceDescriptionItem when encoded as binary.
290func (s SourceDescriptionItem) Len() int {
291 /*
292 * 0 1 2 3
293 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
294 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
295 * | CNAME=1 | length | user and domain name ...
296 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
297 */
298 return sdesTypeLen + sdesOctetCountLen + len([]byte(s.Text))
299}
300
301// Marshal encodes the SourceDescriptionItem in binary.
302func (s SourceDescriptionItem) Marshal() ([]byte, error) {

Callers 2

UnmarshalMethod · 0.95
lenMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected