Make data message naming a bit more consistent. (#4177)

* Make data message naming a bit more consistent.

OnDataPacket and OnDataMessage half-way in the chain made it confusing
(for me at least). Use same name throughout.
API still uses SendDataPacket, but that is not harder to read.

* test
This commit is contained in:
Raja Subramanian
2025-12-19 12:09:16 +05:30
committed by GitHub
parent a04e566dbf
commit e7601251bc
6 changed files with 67 additions and 66 deletions
+3 -3
View File
@@ -645,7 +645,7 @@ func TestDataChannel(t *testing.T) {
}
encoded, _ := proto.Marshal(packetExp)
lpl.OnDataPacket(p, packet.Kind, packet)
lpl.OnDataMessage(p, packet.Kind, packet)
// ensure everyone has received the packet
for _, op := range participants {
@@ -695,7 +695,7 @@ func TestDataChannel(t *testing.T) {
}
encoded, _ := proto.Marshal(packetExp)
lpl.OnDataPacket(p, packet.Kind, packet)
lpl.OnDataMessage(p, packet.Kind, packet)
// only p1 should receive the data
for _, op := range participants {
@@ -729,7 +729,7 @@ func TestDataChannel(t *testing.T) {
}
if p.CanPublishData() {
lpl := rm.LocalParticipantListener()
lpl.OnDataPacket(p, packet.Kind, &packet)
lpl.OnDataMessage(p, packet.Kind, &packet)
}
// no one should've been sent packet