mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-23 23:01:33 +00:00
Merge pull request #59 from tomaka/plain-text-rename
Rename PlainText to PlainTextConfig
This commit is contained in:
@ -47,7 +47,7 @@ fn main() {
|
||||
let tcp = TcpConfig::new(core.handle());
|
||||
|
||||
let with_secio = tcp
|
||||
.with_upgrade(swarm::PlainText)
|
||||
.with_upgrade(swarm::PlainTextConfig)
|
||||
.or_upgrade({
|
||||
let private_key = {
|
||||
let pkcs8 = include_bytes!("test-private-key.pk8");
|
||||
|
@ -47,7 +47,7 @@ fn main() {
|
||||
let tcp = TcpConfig::new(core.handle());
|
||||
|
||||
let with_secio = tcp
|
||||
.with_upgrade(swarm::PlainText)
|
||||
.with_upgrade(swarm::PlainTextConfig)
|
||||
.or_upgrade({
|
||||
let private_key = {
|
||||
let pkcs8 = include_bytes!("test-private-key.pk8");
|
||||
|
@ -148,4 +148,4 @@ pub mod transport;
|
||||
pub use self::connection_reuse::ConnectionReuse;
|
||||
pub use self::multiaddr::Multiaddr;
|
||||
pub use self::muxing::StreamMuxer;
|
||||
pub use self::transport::{ConnectionUpgrade, PlainText, Transport, UpgradedNode, OrUpgrade};
|
||||
pub use self::transport::{ConnectionUpgrade, PlainTextConfig, Transport, UpgradedNode, OrUpgrade};
|
||||
|
@ -448,11 +448,11 @@ impl<A, B, AId, BId> Iterator for NamesIterChain<A, B>
|
||||
/// simply passes communications through without doing anything more.
|
||||
///
|
||||
/// > **Note**: Generally used as an alternative to `secio` if a security layer is not desirable.
|
||||
// TODO: move `PlainText` to a separate crate?
|
||||
// TODO: move `PlainTextConfig` to a separate crate?
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub struct PlainText;
|
||||
pub struct PlainTextConfig;
|
||||
|
||||
impl<C> ConnectionUpgrade<C> for PlainText
|
||||
impl<C> ConnectionUpgrade<C> for PlainTextConfig
|
||||
where C: AsyncRead + AsyncWrite
|
||||
{
|
||||
type Output = C;
|
||||
|
Reference in New Issue
Block a user