diff --git a/rtmp/packet.go b/rtmp/packet.go index 2822c7ac..8b5d9a83 100644 --- a/rtmp/packet.go +++ b/rtmp/packet.go @@ -95,7 +95,7 @@ type packet struct { body []byte } -// read reads an RTMP packet. +// readFrom reads an packet from the RTMP connection. func (pkt *packet) readFrom(s *Session) error { var hbuf [fullHeaderSize]byte header := hbuf[:] @@ -267,7 +267,7 @@ func (pkt *packet) resize(size uint32, ht uint8) { } } -// write sends an RTMP packet. +// writeTo writes a packet to the RTMP connection. // Packets are written in chunks which are Session.chunkSize in length (128 bytes in length). // We defers sending small audio packets and combine consecutive small audio packets where possible to reduce I/O. // When queue is true, we expect a response to this request and cache the method on s.methodCalls.