Crates.io | tcp-request |
lib.rs | tcp-request |
version | 1.10.0 |
source | src |
created_at | 2025-01-01 12:07:32.681093 |
updated_at | 2025-01-09 00:52:55.53412 |
description | A Rust library for sending raw TCP requests, with features for handling responses, managing redirects, and working with compressed data over TCP connections. |
homepage | |
repository | https://github.com/ltpp-universe/tcp-request.git |
max_upload_size | |
id | 1500771 |
size | 21,864 |
A Rust library for sending raw TCP requests, with features for handling responses, managing redirects, and working with compressed data over TCP connections.
To use this crate, you can run cmd:
cargo add tcp-request
use tcp_request::*;
let mut request_builder = RequestBuilder::new()
.host("127.0.0.1")
.port(80)
.data("tcp send")
.build();
request_builder
.send()
.and_then(|response| {
println!("ResponseTrait => {:?}", response.text());
Ok(())
})
.unwrap_or_else(|e| println!("Error => {:?}", e));
use tcp_request::*;
let mut request_builder = RequestBuilder::new()
.host("127.0.0.1")
.port(80)
.data("tcp send".as_bytes())
.build();
request_builder
.send()
.and_then(|response| {
println!("ResponseTrait => {:?}", response.text());
Ok(())
})
.unwrap_or_else(|e| println!("Error => {:?}", e));
Ensure that CMake is installed on the system
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request.
For any inquiries, please reach out to the author at ltpp-universe root@ltpp.vip.