Reexport useful components
Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
This commit is contained in:
parent
d07f8067ff
commit
ac580a666b
|
@ -5,8 +5,7 @@ extern crate url;
|
|||
|
||||
use url::Url;
|
||||
|
||||
use tungstenite::client::connect;
|
||||
use tungstenite::error::{Error, Result};
|
||||
use tungstenite::{connect, Error, Result};
|
||||
|
||||
const AGENT: &'static str = "Tungstenite";
|
||||
|
||||
|
|
|
@ -5,9 +5,7 @@ extern crate tungstenite;
|
|||
use std::net::{TcpListener, TcpStream};
|
||||
use std::thread::spawn;
|
||||
|
||||
use tungstenite::server::accept;
|
||||
use tungstenite::handshake::HandshakeError;
|
||||
use tungstenite::error::{Error, Result};
|
||||
use tungstenite::{accept, HandshakeError, Error, Result};
|
||||
|
||||
fn must_not_block<Stream, Role>(err: HandshakeError<Stream, Role>) -> Error {
|
||||
match err {
|
||||
|
|
|
@ -3,8 +3,7 @@ extern crate url;
|
|||
extern crate env_logger;
|
||||
|
||||
use url::Url;
|
||||
use tungstenite::protocol::Message;
|
||||
use tungstenite::client::connect;
|
||||
use tungstenite::{Message, connect};
|
||||
|
||||
fn main() {
|
||||
env_logger::init().unwrap();
|
||||
|
|
12
src/lib.rs
12
src/lib.rs
|
@ -24,7 +24,15 @@ pub mod protocol;
|
|||
pub mod client;
|
||||
pub mod server;
|
||||
pub mod handshake;
|
||||
pub mod stream;
|
||||
pub mod util;
|
||||
|
||||
mod input_buffer;
|
||||
mod stream;
|
||||
mod util;
|
||||
|
||||
pub use client::{connect, client};
|
||||
pub use server::accept;
|
||||
pub use error::{Error, Result};
|
||||
pub use protocol::{WebSocket, Message};
|
||||
pub use handshake::HandshakeError;
|
||||
pub use handshake::client::ClientHandshake;
|
||||
pub use handshake::server::ServerHandshake;
|
||||
|
|
Loading…
Reference in New Issue