Repository navigation
Forward data packets - #4096
Forward data packets#4096
Conversation
| if d.closed.IsBroken() { | ||
| return errReceiverClosed | ||
| } |
There was a problem hiding this comment.
Since we have this check - just wanted to check if we have/need atomicity with the actions below in this function - would something bad happen if we check closed - we see it's not broken and proceed but then immediately fuse gets broken?
There was a problem hiding this comment.
Will think about it more.
It should be fine I think. The down track will get added, but when delete gets called, it should be cleaned up.
| } | ||
|
|
||
| func (d *DataTrack) HandlePacket(data []byte, packet *datatrack.Packet) { | ||
| d.params.Logger.Infow("received data track message", "id", d.ID(), "name", d.Name(), "size", len(data)) |
There was a problem hiding this comment.
just checking if you intentionally added info level logging on packet level?
There was a problem hiding this comment.
yeah, it is intentional for initial debugging. But, will remove it before merging.
| } | ||
|
|
||
| var lastPacket datatrack.Packet | ||
| if err := lastPacket.Unmarshal(packets[len(packets)-1]); err == nil { |
There was a problem hiding this comment.
nit: I see GenerateRawDataPackets can return nil in some corner cases - maybe we should guard this to avoid packets[len(packets)-1] in that case?
There was a problem hiding this comment.
Good catch. Will do.
|
Merging this to the other PR branch, thank you @milos-lk . If others do have comments, please add and I will address. |
* WIP * WIP * Starting to add some signalling integration testing. * Working tests. * fix tests * Forward data packets (#4096) * WIP commit * WIP * WIP * fix forwarding * address PR comments * move some methods from LocalParticipant to Participant interface * handle subscription update * add extensions and tests * more packet tests * add test for replace extension and fix a bug * update protocol and add config
Next stop on data tracks support. This is set up to merge into my previous PR branch. This adds support for forwarding data track packets.
Some bits TODO:
Will probably looking at getting this merged into the previous branch and into
masterto get minimal version of this feature out. Have to make cloud changes also to get this working across cloud. Will then iterate on it based on usage.