Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 1.21 KB

README.md

File metadata and controls

44 lines (33 loc) · 1.21 KB

rust-cli-chat

Rust Client & Server CLI Chat Application

Motivation

Explore Rust threads, TCP streams and channels.

Getting Started

  • Run the server crate
cd server && cargo run

A TCP listener will bind to 127.0.0.1:6000, awating for connections.

➜  server git:(main) cargo run
   Compiling server v0.1.0 (/projects/rust-cli-chat/server)
    Finished dev [unoptimized + debuginfo] target(s) in 0.78s
     Running `target/debug/server`
Client 127.0.0.1:56795 connected

Then you must run the client crate in another terminal window or tab.

cd client && cargo run

A connection to the TCP listener on 127.0.0.1:6000 will be established and you will be prompted to write a message:

➜  client git:(main) cargo run
   Compiling client v0.1.0 (/projects/rust-cli-chat/client)
    Finished dev [unoptimized + debuginfo] target(s) in 0.78s
     Running `target/debug/client`
Write a message: