{"id":26165039,"url":"https://github.com/0xsaksham/multi_thread_server","last_synced_at":"2025-08-22T19:22:32.042Z","repository":{"id":236467679,"uuid":"792671231","full_name":"0xSaksham/multi_thread_server","owner":"0xSaksham","description":"Efficiently manage concurrent connections with a multi-threaded TCP server implemented in Rust.","archived":false,"fork":false,"pushed_at":"2024-07-14T18:25:26.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-07-14T19:46:24.040Z","etag":null,"topics":["multithreading","rust","server"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xSaksham.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-27T08:28:23.000Z","updated_at":"2024-07-14T18:25:30.000Z","dependencies_parsed_at":"2024-04-27T09:45:42.321Z","dependency_job_id":null,"html_url":"https://github.com/0xSaksham/multi_thread_server","commit_stats":null,"previous_names":["0xsaksham/multi_thread_server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xSaksham%2Fmulti_thread_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xSaksham%2Fmulti_thread_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xSaksham%2Fmulti_thread_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xSaksham%2Fmulti_thread_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xSaksham","download_url":"https://codeload.github.com/0xSaksham/multi_thread_server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243066787,"owners_count":20230806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["multithreading","rust","server"],"created_at":"2025-03-11T15:57:37.369Z","updated_at":"2025-03-11T15:57:38.767Z","avatar_url":"https://github.com/0xSaksham.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multi-Threaded TCP Server in Rust\n\nThis project implements a multi-threaded TCP server in Rust, capable of handling concurrent connections using a thread pool. It's designed to be efficient, scalable, and easily configurable.\n\n## Table of Contents\n- [Features](#features)\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installation](#installation)\n- [Usage](#usage)\n  - [Starting the Server](#starting-the-server)\n  - [Configuration](#configuration)\n- [How It Works](#how-it-works)\n- [Contributing](#contributing)\n\n## Features\n\n- **Thread Pool**: Utilizes a thread pool to manage concurrent connections efficiently.\n- **Graceful Shutdown**: Supports graceful shutdown, ensuring all connections are handled properly before the server stops.\n- **Customizable Configuration**: Allows easy configuration of server settings such as the listening address and port.\n- **Scalable Architecture**: Designed to handle a large number of simultaneous connections.\n\n## Getting Started\n\n### Prerequisites\n\nMake sure you have Rust and Cargo installed on your system. You can install Rust and Cargo by following the instructions [here](https://www.rust-lang.org/tools/install).\n\n### Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/0xsaksham/multi_thread_server.git\n   ```\n\n2. Navigate to the project directory:\n   ```bash\n   cd multi_thread_server\n   ```\n\n3. Build the project:\n   ```bash\n   cargo build --release\n   ```\n\n## Usage\n\n### Starting the Server\n\nTo start the server, run the following command:\n\n```bash\ncargo run\n```\n\nBy default, the server listens on `127.0.0.1:7878` or `localhost:7878`.\n\n### Configuration\n\nYou can modify the server settings, such as the listening address and port, in the `main.rs` file. Additionally, you can adjust the size of the thread pool according to your requirements.\n\nExample configuration in `main.rs`:\n\n```rust\nconst ADDRESS: \u0026str = \"127.0.0.1\";\nconst PORT: u16 = 7878;\nconst POOL_SIZE: usize = 4;\n\nfn main() {\n    let server = Server::new(ADDRESS, PORT, POOL_SIZE);\n    server.run();\n}\n```\n\n## How It Works\n\nThe server utilizes a thread pool to handle incoming connections concurrently. Here's a brief overview of the process:\n\n1. The server listens for incoming connections on the specified address and port.\n2. When a client connects, a worker thread from the pool is assigned to handle the connection.\n3. The worker thread processes the client's request and sends a response.\n4. Once the request is handled, the worker thread is returned to the pool, ready to handle another connection.\n\nThis architecture allows the server to process multiple requests simultaneously without blocking, making it efficient for handling concurrent connections.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xsaksham%2Fmulti_thread_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xsaksham%2Fmulti_thread_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xsaksham%2Fmulti_thread_server/lists"}