From 4260692034d9f78f2e99ea4cd00c12dbacf42929 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Mon, 22 Oct 2018 18:52:40 -0700 Subject: [PATCH] add DefaultClient type alias --- src/ws/client/mod.rs | 2 +- src/ws/client/service.rs | 3 +++ src/ws/mod.rs | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ws/client/mod.rs b/src/ws/client/mod.rs index 0dbf081c6..12c7229b9 100644 --- a/src/ws/client/mod.rs +++ b/src/ws/client/mod.rs @@ -4,7 +4,7 @@ mod service; pub use self::connect::Connect; pub use self::error::ClientError; -pub use self::service::Client; +pub use self::service::{Client, DefaultClient}; #[derive(PartialEq, Hash, Debug, Clone, Copy)] pub(crate) enum Protocol { diff --git a/src/ws/client/service.rs b/src/ws/client/service.rs index ab0e48035..8e97b743d 100644 --- a/src/ws/client/service.rs +++ b/src/ws/client/service.rs @@ -19,6 +19,9 @@ use ws::Codec; use super::{ClientError, Connect, Protocol}; +/// Default client, uses default connector. +pub type DefaultClient = Client>; + /// WebSocket's client pub struct Client where diff --git a/src/ws/mod.rs b/src/ws/mod.rs index b5a667084..1fbbd03dd 100644 --- a/src/ws/mod.rs +++ b/src/ws/mod.rs @@ -18,7 +18,7 @@ mod proto; mod service; mod transport; -pub use self::client::{Client, ClientError, Connect}; +pub use self::client::{Client, ClientError, Connect, DefaultClient}; pub use self::codec::{Codec, Frame, Message}; pub use self::frame::Parser; pub use self::proto::{CloseCode, CloseReason, OpCode};