Skip to content

EstebanBorai/rust-cli-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

Rust Client & Server CLI Chat Application

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages