RobotDisco / rust_chat

Playing around with Rust + networking

Home Page:https://nbaksalyar.github.io/2015/07/10/writing-chat-in-rust.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rust Chat app

(tutorial websocket app from the tutorial https://nbaksalyar.github.io/2015/07/10/writing-chat-in-rust.html)

What it does

If you launch it, and then use a javascript app to connect to it, it will establish a connection!

ws = new WebSocket('ws://127.0.0.1:10000');

if (ws.readyState == WebSocket.OPEN) {
    console.log('Connection is successful');
}

How to run it

  1. Have the rust ecosystem installed on your computer (see https://www.rust-lang.org/en-US/install.html)
  2. Check out the code src_sh{git clone https://github.com/robotdisco/rust_chat}
  3. cargo build
  4. cargo run
  5. Launch a browser and use its dev tools to run the code block from the previous section! Enjoy :)

About

Playing around with Rust + networking

https://nbaksalyar.github.io/2015/07/10/writing-chat-in-rust.html


Languages

Language:Rust 100.0%