Reexport useful components

Signed-off-by: Alexey Galakhov <agalakhov@snapview.de>
pull/7/head
Alexey Galakhov 8 years ago
parent d07f8067ff
commit ac580a666b
  1. 3
      examples/autobahn-client.rs
  2. 4
      examples/autobahn-server.rs
  3. 3
      examples/client.rs
  4. 12
      src/lib.rs

@ -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();

@ -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…
Cancel
Save