Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Subscribe Announces #303

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Support Subscribe Announces #303

wants to merge 14 commits into from

Conversation

suhasHere
Copy link
Contributor

No description provided.

@suhasHere suhasHere changed the title Support Subscribe Announces (WIP) Support Subscribe Announces Oct 31, 2024
cmd/examples/server.cpp Outdated Show resolved Hide resolved
include/quicr/detail/transport.h Show resolved Hide resolved
cmd/examples/server.cpp Outdated Show resolved Hide resolved
src/client.cpp Show resolved Hide resolved
src/messages.cpp Outdated Show resolved Hide resolved
src/server.cpp Outdated Show resolved Hide resolved
Comment on lines +539 to +545
auto it = conn_it->second.announce_subscriptions.find(ns_prefix);
if (it != conn_it->second.announce_subscriptions.end()) {
// do nothing
return;
}

conn_it->second.announce_subscriptions[ns_prefix] = std::move(handler);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it already is conn_it->second.announce_subscriptions[ns_prefix], we don't need to look it up again. In map this is effectively an O(1) operation though, so maybe it doesn't matter.

cmd/examples/client.cpp Outdated Show resolved Hide resolved
cmd/examples/server.cpp Outdated Show resolved Hide resolved
cmd/examples/server.cpp Outdated Show resolved Hide resolved
cmd/examples/server.cpp Outdated Show resolved Hide resolved
cmd/examples/server.cpp Outdated Show resolved Hide resolved
include/quicr/server.h Show resolved Hide resolved
include/quicr/server.h Outdated Show resolved Hide resolved
cmd/examples/server.cpp Outdated Show resolved Hide resolved
include/quicr/detail/messages.h Show resolved Hide resolved
include/quicr/subscribe_announces_handler.h Outdated Show resolved Hide resolved
src/client.cpp Show resolved Hide resolved
src/client.cpp Show resolved Hide resolved
src/server.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@TimEvens TimEvens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but doesn't seem to be working correctly... likely because Contains() is being used to match the track namespace prefix.

For example, subscribe to announces a,b... Publish announces of a,b works as expected, but does not work for a,b,? and a,b,**

There isn't a debug message for the announce subscribe, but I did announce subscribe to x,y and then published announce using x,y,z which resulted in the below log message.

[2024-11-01 15:18:59.277] [info] [server.cpp:349] No match Found for announced namespace. prefix: x/y, namespace: x/y

Using anything other than x,y for the announce, it doesn't match. If I publish announce using x,y it does work with:

[2024-11-01 15:22:24.285] [info] [server.cpp:342] Found a match for announced namespace. prefix: x/y, namespace: x/y

So in other words, prefix matching is not working for announce subscribes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants