mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 22:51:13 +00:00
Put back support for WebSockets in the transport (#1486)
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use futures::prelude::*;
|
||||
use libp2p::{InboundUpgradeExt, OutboundUpgradeExt, PeerId, Transport, mplex, secio, yamux, tcp, dns};
|
||||
use libp2p::{InboundUpgradeExt, OutboundUpgradeExt, PeerId, Transport, mplex, secio, yamux, tcp, dns, websocket};
|
||||
use libp2p::core::{self, transport::boxed::Boxed, muxing::StreamMuxerBox};
|
||||
use std::{io, time::Duration, usize};
|
||||
|
||||
@@ -28,6 +28,7 @@ pub fn build_transport(
|
||||
mplex_config.max_buffer_len(usize::MAX);
|
||||
|
||||
let transport = tcp::TcpConfig::new();
|
||||
let transport = websocket::WsConfig::new(transport.clone()).or_transport(transport);
|
||||
let transport = dns::DnsConfig::new(transport);
|
||||
|
||||
// TODO: rework the transport creation (https://github.com/libp2p/rust-libp2p/issues/783)
|
||||
|
||||
Reference in New Issue
Block a user