Skip to content

robdicoco/rust_client_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Client Server in Rust logo

Project Client Server in Rust


A Rust library for simplified safe math operations.

📝 Table of Contents

🧐 About

This project provides a basic sample application demonstrating client-server communication in Rust. It includes a simple server program and a corresponding client program that can send and receive messages.

🏁 Getting Started

This guide will help you set up and run the client-server sample application.

Prerequisites

  • Rust compiler: Download and install Rust from the official website https://www.rust-lang.org/tools/install.
  • Basic understanding of Rust: Familiarity with core Rust concepts like functions, variables, and data types is recommended.

Installing

  1. Clone this repository:
Bash
git clone https://your_github_url/client-server.git

Use code with caution.

  1. Navigate to the project directory:
cd client-server

Run 'cargo build' to compile both the client and server programs.

🔧 Running the tests

The project includes unit tests for both the client and server code. To run the tests, execute:

Bash
cargo test

🎈 Usage

  1. Run the server:

Open a terminal window and navigate to the project directory. Run the following command to start the server:

Bash
cargo run --bin server

This will start the server program, which will listen for incoming connections on a specific port (default: 8080).

  1. Run the client:

Open another terminal window and navigate to the project directory. Run the following command to start the client program:

Bash
cargo run --bin client

This will start the client program, which will attempt to connect to the server running on the specified port. You can then type messages in the client terminal, and they will be sent to the server and displayed on the server console.

🚀 Deployment

This is a sample application intended for educational purposes. For production deployments, consider using more robust frameworks and libraries designed for client-server communication in Rust.

⛏️ Built Using

📜 License:

This project is licensed under the license Creative Commons Attribution 4.0 International (CC-BY-4.0).

✍️ Authors

🎉 Acknowledgements

  • NearX Rust learning

About

A Rust client server application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published