Struct cross_socket::socket::SocketOption
source · pub struct SocketOption {
pub ip_version: IpVersion,
pub socket_type: SocketType,
pub protocol: Option<IpNextLevelProtocol>,
pub timeout: Option<u64>,
pub ttl: Option<u32>,
pub non_blocking: bool,
}
Expand description
Socket option
Fields§
§ip_version: IpVersion
IP version
socket_type: SocketType
Socket type
protocol: Option<IpNextLevelProtocol>
Protocol. TCP, UDP, ICMP, etc.
timeout: Option<u64>
Timeout
ttl: Option<u32>
TTL or Hop Limit
non_blocking: bool
Non-blocking mode
Implementations§
source§impl SocketOption
impl SocketOption
sourcepub fn new(
ip_version: IpVersion,
socket_type: SocketType,
protocol: Option<IpNextLevelProtocol>
) -> SocketOption
pub fn new( ip_version: IpVersion, socket_type: SocketType, protocol: Option<IpNextLevelProtocol> ) -> SocketOption
Constructs a new SocketOption
Trait Implementations§
source§impl Clone for SocketOption
impl Clone for SocketOption
source§fn clone(&self) -> SocketOption
fn clone(&self) -> SocketOption
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for SocketOption
impl Send for SocketOption
impl Sync for SocketOption
impl Unpin for SocketOption
impl UnwindSafe for SocketOption
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