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

Method split

packet_buffer.go:220–229  ·  view source on GitHub ↗

Consumes `size` bytes and returns them as an independent PacketBuffer.

(size int)

Source from the content-addressed store, hash-verified

218// Consumes `size` bytes and returns them as an
219// independent PacketBuffer.
220func (b *packetBuffer) split(size int) packetBuffer {
221 if size > len(b.bytes) {
222 size = len(b.bytes)
223 }
224 newBuffer := packetBuffer{bytes: b.bytes[:size]}
225
226 b.bytes = b.bytes[size:]
227
228 return newBuffer
229}
230
231// Returns the size that a structure will encode into.
232// This fuction doesn't check that Write() will succeed,

Callers 1

UnmarshalMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected