Debug logging for the MoQ SETUP too. (#122)

This commit is contained in:
kixelated 2023-11-07 21:14:51 +09:00 committed by GitHub
parent bafee96d95
commit b8cc7bcd59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -45,10 +45,13 @@ impl Client {
},
};
log::debug!("sending client SETUP: {:?}", client);
client.encode(&mut control.0).await?;
let mut server = setup::Server::decode(&mut control.1).await?;
log::debug!("received server SETUP: {:?}", server);
match server.version {
setup::Version::DRAFT_01 => {
// We always require this extension

View File

@ -15,6 +15,8 @@ impl Server {
let mut client = setup::Client::decode(&mut control.1).await?;
log::debug!("received client SETUP: {:?}", client);
if client.versions.contains(&setup::Version::DRAFT_01) {
// We always require subscriber ID.
client.extensions.require_subscriber_id()?;
@ -91,6 +93,8 @@ impl Request {
params: Default::default(),
};
log::debug!("sending server SETUP: {:?}", server);
// We need to sure we support the opposite of the client's role.
// ex. if the client is a publisher, we must be a subscriber ONLY.
if !self.client.role.is_compatible(server.role) {