mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-28 10:11:19 +00:00
More concerns
This commit is contained in:
parent
aa2c4a2a45
commit
ed5a24c591
@ -74,15 +74,14 @@ impl<C> ConnectionUpgrade<C> for IdentifyProtocol
|
||||
{
|
||||
type NamesIter = iter::Once<(Bytes, Self::UpgradeIdentifier)>;
|
||||
type UpgradeIdentifier = ();
|
||||
type Output = Option<IdentifyInfo>;
|
||||
type Future = Box<Future<Item = Self::Output, Error = IoError>>;
|
||||
|
||||
#[inline]
|
||||
fn protocol_names(&self) -> Self::NamesIter {
|
||||
iter::once((Bytes::from("/ipfs/id/1.0.0"), ()))
|
||||
}
|
||||
|
||||
type Output = Option<IdentifyInfo>;
|
||||
type Future = Box<Future<Item = Self::Output, Error = IoError>>;
|
||||
|
||||
fn upgrade(self, socket: C, _: (), ty: Endpoint) -> Self::Future {
|
||||
// TODO: use jack's varint library instead
|
||||
let socket = length_delimited::Builder::new().length_field_length(1).new_framed(socket);
|
||||
|
Loading…
x
Reference in New Issue
Block a user