https://github.com/studyresearchprojects/rust-cli-chat
Rust Client & Server CLI Chat Application
https://github.com/studyresearchprojects/rust-cli-chat
chat mpsc rust streams sync tcp
Last synced: about 1 month ago
JSON representation
Rust Client & Server CLI Chat Application
- Host: GitHub
- URL: https://github.com/studyresearchprojects/rust-cli-chat
- Owner: StudyResearchProjects
- Created: 2020-06-02T22:40:26.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2020-10-27T02:13:50.000Z (over 5 years ago)
- Last Synced: 2025-10-13T08:43:39.591Z (6 months ago)
- Topics: chat, mpsc, rust, streams, sync, tcp
- Language: Rust
- Homepage:
- Size: 5.86 KB
- Stars: 7
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
rust-cli-chat
Rust Client & Server CLI Chat Application
## Motivation
Explore Rust threads, TCP streams and channels.
## Getting Started
- Run the `server` crate
```bash
cd server && cargo run
```
A TCP listener will bind to `127.0.0.1:6000`, awating for connections.
```log
➜ 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.
```bash
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:
```log
➜ 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:
```