Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion protocols/rendezvous/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

use libp2p_swarm::StreamProtocol;

pub use self::codec::{Cookie, ErrorCode, Namespace, NamespaceTooLong, Registration, Ttl};
pub use self::codec::{Cookie, ErrorCode, Namespace, NamespaceTooLong, Registration, Ttl, NewRegistration};

mod codec;

Expand Down
4 changes: 4 additions & 0 deletions protocols/rendezvous/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ impl Behaviour {
registrations: Registrations::with_config(config),
}
}

pub fn add_registration(&mut self, registration: NewRegistration) -> Result<Registration, TtlOutOfRange> {
self.registrations.add(registration)
}
}

#[derive(Debug)]
Expand Down
Loading