commit 9b7bc68411aa435947ce2b33c49c4e2cf2b8de88
parent 9d3606015d4f3d5a4972e92d41f5b92dd6469f20
Author: Oliver Lowe <o@olowe.co>
Date: Tue, 23 Jul 2024 15:35:40 +1000
rtp: detail TODOs properly
This makes it easier to pick up the work some time in the future
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/rtp/session.go b/rtp/session.go
@@ -17,8 +17,10 @@ func Dial(network, addr string) (*Session, error) {
return &s, nil
}
-// Session represents a RTP session... TODO(otl)
+// Session represents a RTP session...
// When a Session is established with Dial(), ...
+// TODO(otl): what does session automatically handle? what do we not
+// need to set in each packets header?
type Session struct {
// Clock is the rate of the... in hertz.
// If zero, automatic detection attempted...
@@ -38,6 +40,9 @@ func (s *Session) init() {
}
// Transmit sends the packet to the destination address in s.
+//
+// TODO(otl): some fields in packet's header are set by Transmit.
+// Which ones? Otherwise people are going to get surprised!
func (s *Session) Transmit(packet *Packet) error {
if packet.Header.Version == 0 {
packet.Header.Version = VersionRFC3550