[][src]Function simple_libc::net::setsockopt_raw

pub unsafe fn setsockopt_raw<T: Sized>(
    sockfd: Int,
    level: Int,
    optname: Int,
    data: &[T]
) -> Result<()>

Sets the value of the given socket option.

This function is a simple wrapper around libc::getsockopt() that sets the value of the socket option to the contents of a generic slice.

Safety

This function has no way to verify that the slice containing the data is the correct format for representing the given socket option. If that can be verified, then this function should be safe for use.