Struct machinery_api::foundation::OsSocketApi [−][src]
#[repr(C)]pub struct OsSocketApi {}Show 17 fields
pub init: Option<unsafe extern "C" fn()>, pub shutdown: Option<unsafe extern "C" fn()>, pub socket: Option<unsafe extern "C" fn(type_: OsSocketType) -> SocketO>, pub set_option: Option<unsafe extern "C" fn(socket: SocketO, option: OsSocketOption, enabled: bool)>, pub bind: Option<unsafe extern "C" fn(socket: SocketO, address: SocketAddressT) -> bool>, pub getsockname: Option<unsafe extern "C" fn(socket: SocketO, address: *mut SocketAddressT) -> bool>, pub listen: Option<unsafe extern "C" fn(socket: SocketO, queue_size: u32) -> bool>, pub accept: Option<unsafe extern "C" fn(socket: SocketO, address: *mut SocketAddressT) -> SocketO>, pub connect: Option<unsafe extern "C" fn(socket: SocketO, target: SocketAddressT) -> OsSocketConnect>, pub send: Option<unsafe extern "C" fn(socket: SocketO, buffer: *const c_void, size: u32) -> i32>, pub recv: Option<unsafe extern "C" fn(socket: SocketO, buffer: *mut c_void, size: u32) -> i32>, pub sendto: Option<unsafe extern "C" fn(socket: SocketO, buffer: *const c_void, size: u32, target: SocketAddressT) -> i32>, pub recvfrom: Option<unsafe extern "C" fn(socket: SocketO, buffer: *mut c_void, size: u32, source: *mut SocketAddressT) -> i32>, pub close: Option<unsafe extern "C" fn(socket: SocketO) -> bool>, pub getaddrinfo: Option<unsafe extern "C" fn(name: *const c_char, service: *const c_char, addresses: *mut SocketAddressT, size: u32) -> u32>, pub getaddrinfo_async: Option<unsafe extern "C" fn(name: *const c_char, service: *const c_char) -> *mut c_void>, pub getaddrinfo_result: Option<unsafe extern "C" fn(query: *mut c_void, addresses: *mut SocketAddressT, count: *mut u32) -> OsSocketGetaddrinfo>,
Fields
init: Option<unsafe extern "C" fn()>shutdown: Option<unsafe extern "C" fn()>socket: Option<unsafe extern "C" fn(type_: OsSocketType) -> SocketO>set_option: Option<unsafe extern "C" fn(socket: SocketO, option: OsSocketOption, enabled: bool)>bind: Option<unsafe extern "C" fn(socket: SocketO, address: SocketAddressT) -> bool>getsockname: Option<unsafe extern "C" fn(socket: SocketO, address: *mut SocketAddressT) -> bool>listen: Option<unsafe extern "C" fn(socket: SocketO, queue_size: u32) -> bool>accept: Option<unsafe extern "C" fn(socket: SocketO, address: *mut SocketAddressT) -> SocketO>connect: Option<unsafe extern "C" fn(socket: SocketO, target: SocketAddressT) -> OsSocketConnect>send: Option<unsafe extern "C" fn(socket: SocketO, buffer: *const c_void, size: u32) -> i32>recv: Option<unsafe extern "C" fn(socket: SocketO, buffer: *mut c_void, size: u32) -> i32>sendto: Option<unsafe extern "C" fn(socket: SocketO, buffer: *const c_void, size: u32, target: SocketAddressT) -> i32>recvfrom: Option<unsafe extern "C" fn(socket: SocketO, buffer: *mut c_void, size: u32, source: *mut SocketAddressT) -> i32>close: Option<unsafe extern "C" fn(socket: SocketO) -> bool>getaddrinfo: Option<unsafe extern "C" fn(name: *const c_char, service: *const c_char, addresses: *mut SocketAddressT, size: u32) -> u32>getaddrinfo_async: Option<unsafe extern "C" fn(name: *const c_char, service: *const c_char) -> *mut c_void>getaddrinfo_result: Option<unsafe extern "C" fn(query: *mut c_void, addresses: *mut SocketAddressT, count: *mut u32) -> OsSocketGetaddrinfo>Implementations
pub unsafe fn sendto(
&self,
socket: SocketO,
buffer: *const c_void,
size: u32,
target: SocketAddressT
) -> i32
pub unsafe fn recvfrom(
&self,
socket: SocketO,
buffer: *mut c_void,
size: u32,
source: *mut SocketAddressT
) -> i32
pub unsafe fn getaddrinfo(
&self,
name: *const c_char,
service: *const c_char,
addresses: *mut SocketAddressT,
size: u32
) -> u32
pub unsafe fn getaddrinfo_result(
&self,
query: *mut c_void,
addresses: *mut SocketAddressT,
count: *mut u32
) -> OsSocketGetaddrinfo
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for OsSocketApi
impl Send for OsSocketApi
impl Sync for OsSocketApi
impl Unpin for OsSocketApi
impl UnwindSafe for OsSocketApi
Blanket Implementations
Mutably borrows from an owned value. Read more