Rename the library to "tungstenite"

pull/7/head
Alexey Galakhov 8 years ago
parent 7dccc51277
commit 838c8e7ea8
  1. 2
      Cargo.toml
  2. 10
      examples/autobahn-client.rs
  3. 8
      examples/autobahn-server.rs
  4. 8
      examples/client.rs

@ -1,5 +1,5 @@
[package] [package]
name = "ws2" name = "tungstenite"
version = "0.1.0" version = "0.1.0"
authors = ["Alexey Galakhov"] authors = ["Alexey Galakhov"]

@ -1,14 +1,14 @@
#[macro_use] extern crate log; #[macro_use] extern crate log;
extern crate env_logger; extern crate env_logger;
extern crate ws2; extern crate tungstenite;
extern crate url; extern crate url;
use url::Url; use url::Url;
use ws2::protocol::Message; use tungstenite::protocol::Message;
use ws2::client::connect; use tungstenite::client::connect;
use ws2::handshake::Handshake; use tungstenite::handshake::Handshake;
use ws2::error::{Error, Result}; use tungstenite::error::{Error, Result};
const AGENT: &'static str = "WS2-RS"; const AGENT: &'static str = "WS2-RS";

@ -1,13 +1,13 @@
#[macro_use] extern crate log; #[macro_use] extern crate log;
extern crate env_logger; extern crate env_logger;
extern crate ws2; extern crate tungstenite;
use std::net::{TcpListener, TcpStream}; use std::net::{TcpListener, TcpStream};
use std::thread::spawn; use std::thread::spawn;
use ws2::server::accept; use tungstenite::server::accept;
use ws2::error::Result; use tungstenite::error::Result;
use ws2::handshake::Handshake; use tungstenite::handshake::Handshake;
fn handle_client(stream: TcpStream) -> Result<()> { fn handle_client(stream: TcpStream) -> Result<()> {
let mut socket = accept(stream).handshake_wait()?; let mut socket = accept(stream).handshake_wait()?;

@ -1,11 +1,11 @@
extern crate ws2; extern crate tungstenite;
extern crate url; extern crate url;
extern crate env_logger; extern crate env_logger;
use url::Url; use url::Url;
use ws2::protocol::Message; use tungstenite::protocol::Message;
use ws2::client::connect; use tungstenite::client::connect;
use ws2::handshake::Handshake; use tungstenite::handshake::Handshake;
fn main() { fn main() {
env_logger::init().unwrap(); env_logger::init().unwrap();

Loading…
Cancel
Save