tcp-request 2.3.16

A Rust library for sending raw TCP requests, with features for handling responses, managing redirects, and working with compressed data over TCP connections.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::*;

/// Trait defining the interface for request operations.
pub trait RequestTrait: Send + Debug {
    type RequestResult: Sized;

    /// Sends data through the request.
    ///
    /// # Arguments
    ///
    /// - `&[u8]` - The data to be sent.
    ///
    /// # Returns
    ///
    /// - `Self::RequestResult` - The result of the send operation.
    fn send(&mut self, data: &[u8]) -> Self::RequestResult;
}