pub struct NetworkClient { /* private fields */ }Expand description
A client for network-based fuzzing that supports both TCP and UDP protocols.
Implementations§
Source§impl NetworkClient
impl NetworkClient
Sourcepub fn connect_to_server(&mut self, host: &str, port: u16) -> Result<()>
pub fn connect_to_server(&mut self, host: &str, port: u16) -> Result<()>
Connect to a target server.
§Arguments
host- Hostname or IP address of the target serverport- Port number of the target server
§Returns
Ok(()) on successful connection, or an error if connection fails
§Description
For TCP, this performs the actual connection and will retry up to 1000 times. For UDP, this sets up the socket but doesn’t establish a connection.
Sourcepub fn send_message(&mut self, message: &[u8]) -> Result<()>
pub fn send_message(&mut self, message: &[u8]) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NetworkClient
impl RefUnwindSafe for NetworkClient
impl Send for NetworkClient
impl Sync for NetworkClient
impl Unpin for NetworkClient
impl UnwindSafe for NetworkClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more