mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-25 07:41:34 +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 tcp = TcpConfig::new(core.handle());
|
||||||
|
|
||||||
let with_secio = tcp
|
let with_secio = tcp
|
||||||
.with_upgrade(swarm::PlainText)
|
.with_upgrade(swarm::PlainTextConfig)
|
||||||
.or_upgrade({
|
.or_upgrade({
|
||||||
let private_key = {
|
let private_key = {
|
||||||
let pkcs8 = include_bytes!("test-private-key.pk8");
|
let pkcs8 = include_bytes!("test-private-key.pk8");
|
||||||
|
@ -47,7 +47,7 @@ fn main() {
|
|||||||
let tcp = TcpConfig::new(core.handle());
|
let tcp = TcpConfig::new(core.handle());
|
||||||
|
|
||||||
let with_secio = tcp
|
let with_secio = tcp
|
||||||
.with_upgrade(swarm::PlainText)
|
.with_upgrade(swarm::PlainTextConfig)
|
||||||
.or_upgrade({
|
.or_upgrade({
|
||||||
let private_key = {
|
let private_key = {
|
||||||
let pkcs8 = include_bytes!("test-private-key.pk8");
|
let pkcs8 = include_bytes!("test-private-key.pk8");
|
||||||
|
@ -148,4 +148,4 @@ pub mod transport;
|
|||||||
pub use self::connection_reuse::ConnectionReuse;
|
pub use self::connection_reuse::ConnectionReuse;
|
||||||
pub use self::multiaddr::Multiaddr;
|
pub use self::multiaddr::Multiaddr;
|
||||||
pub use self::muxing::StreamMuxer;
|
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.
|
/// simply passes communications through without doing anything more.
|
||||||
///
|
///
|
||||||
/// > **Note**: Generally used as an alternative to `secio` if a security layer is not desirable.
|
/// > **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)]
|
#[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
|
where C: AsyncRead + AsyncWrite
|
||||||
{
|
{
|
||||||
type Output = C;
|
type Output = C;
|
||||||
|
Reference in New Issue
Block a user