pub struct TcpConfig {
pub port: u16,
pub host: String,
pub fixtures_dir: Option<PathBuf>,
pub timeout_secs: u64,
pub max_connections: usize,
pub read_buffer_size: usize,
pub write_buffer_size: usize,
pub enable_tls: bool,
pub tls_cert_path: Option<PathBuf>,
pub tls_key_path: Option<PathBuf>,
pub echo_mode: bool,
pub delimiter: Option<Vec<u8>>,
}Expand description
TCP server configuration
Fields§
§port: u16Server port (default: 9999)
host: StringHost address (default: 0.0.0.0)
fixtures_dir: Option<PathBuf>Directory containing fixture files
timeout_secs: u64Connection timeout in seconds
max_connections: usizeMaximum connections
read_buffer_size: usizeBuffer size for reading data (bytes)
write_buffer_size: usizeBuffer size for writing data (bytes)
enable_tls: boolEnable TLS/SSL support
tls_cert_path: Option<PathBuf>Path to TLS certificate file
tls_key_path: Option<PathBuf>Path to TLS private key file
echo_mode: boolEcho mode: echo back received data (if no fixture matches)
delimiter: Option<Vec<u8>>Delimiter for message boundaries (None = stream mode, Some = frame by delimiter)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TcpConfig
impl<'de> Deserialize<'de> for TcpConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TcpConfig
impl RefUnwindSafe for TcpConfig
impl Send for TcpConfig
impl Sync for TcpConfig
impl Unpin for TcpConfig
impl UnwindSafe for TcpConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)