Debug logging for the MoQ SETUP too. (#122)
This commit is contained in:
parent
bafee96d95
commit
b8cc7bcd59
|
@ -45,10 +45,13 @@ impl Client {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
log::debug!("sending client SETUP: {:?}", client);
|
||||||
client.encode(&mut control.0).await?;
|
client.encode(&mut control.0).await?;
|
||||||
|
|
||||||
let mut server = setup::Server::decode(&mut control.1).await?;
|
let mut server = setup::Server::decode(&mut control.1).await?;
|
||||||
|
|
||||||
|
log::debug!("received server SETUP: {:?}", server);
|
||||||
|
|
||||||
match server.version {
|
match server.version {
|
||||||
setup::Version::DRAFT_01 => {
|
setup::Version::DRAFT_01 => {
|
||||||
// We always require this extension
|
// We always require this extension
|
||||||
|
|
|
@ -15,6 +15,8 @@ impl Server {
|
||||||
|
|
||||||
let mut client = setup::Client::decode(&mut control.1).await?;
|
let mut client = setup::Client::decode(&mut control.1).await?;
|
||||||
|
|
||||||
|
log::debug!("received client SETUP: {:?}", client);
|
||||||
|
|
||||||
if client.versions.contains(&setup::Version::DRAFT_01) {
|
if client.versions.contains(&setup::Version::DRAFT_01) {
|
||||||
// We always require subscriber ID.
|
// We always require subscriber ID.
|
||||||
client.extensions.require_subscriber_id()?;
|
client.extensions.require_subscriber_id()?;
|
||||||
|
@ -91,6 +93,8 @@ impl Request {
|
||||||
params: Default::default(),
|
params: Default::default(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
log::debug!("sending server SETUP: {:?}", server);
|
||||||
|
|
||||||
// We need to sure we support the opposite of the client's role.
|
// 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.
|
// ex. if the client is a publisher, we must be a subscriber ONLY.
|
||||||
if !self.client.role.is_compatible(server.role) {
|
if !self.client.role.is_compatible(server.role) {
|
||||||
|
|
Loading…
Reference in New Issue