This project demonstrates a basic implementation of client-server communication using TCP sockets in Rust. The server and client components are written in Rust programming language.
- Secure authentication using a shared secret token.
- Continuous communication between the server and client.
- Error handling for network connections and data transmission.
To get started with the project, follow these steps:
-
Clone the repository:
git clone https://github.com/mranv/tcp.git
-
Navigate to the project directory:
cd tcp
-
Compile the code:
cargo build --release
-
Run the server:
./target/release/server
-
Run the client:
./target/release/client
Upon running the client, it connects to the server and attempts to authenticate using a shared secret token. If authentication is successful, the server sends continuous "hello" messages to the client, which are displayed on the client's terminal. If authentication fails, the server refuses the connection.
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Contributions are welcome! Feel free to submit pull requests or open issues for any improvements or suggestions.
Special thanks to OpenAI for providing assistance with language models.
For any questions or support, please open an issue on GitHub.
Visit the GitHub repository to explore the code and contribute to the project.