A simple UDP request library for sending and receiving UDP packets, designed to handle network communication in Rust applications.
To use this crate, you can run cmd:
cargo add udp-requestuse udp_request::*;
let mut request_builder = RequestBuilder::new()
.host("127.0.0.1")
.port(80)
.build();
request_builder
.send("udp send".as_bytes())
.and_then(|response| {
println!("ResponseTrait => {:?}", response.text());
Ok(())
})
.unwrap_or_else(|e| println!("Error => {:?}", e));use udp_request::*;
let mut request_builder = RequestBuilder::new()
.host("127.0.0.1")
.port(80)
.build();
request_builder
.send("udp send".as_bytes())
.and_then(|response| {
println!("ResponseTrait => {:?}", response.binary());
Ok(())
})
.unwrap_or_else(|e| println!("Error => {:?}", e));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 root@ltpp.vip.