Struct nex_socket::SocketOption
source · pub struct SocketOption {
pub ip_version: IpVersion,
pub socket_type: SocketType,
pub protocol: Option<IpNextLevelProtocol>,
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.
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 Freeze for SocketOption
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