#[repr(C)]pub struct WebTalkerApi {Show 24 fields
pub create: Option<unsafe extern "C" fn(a: *mut AllocatorI, socket: *mut OsSocketApi, port: u32) -> *mut WebTalkerO>,
pub listening_address: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, address: *mut SocketAddressT) -> bool>,
pub create_no_server: Option<unsafe extern "C" fn(a: *mut AllocatorI, socket: *mut OsSocketApi) -> *mut WebTalkerO>,
pub destroy: Option<unsafe extern "C" fn(arg1: *mut WebTalkerO)>,
pub receive: Option<unsafe extern "C" fn(inst: *mut WebTalkerO)>,
pub send: Option<unsafe extern "C" fn(inst: *mut WebTalkerO)>,
pub http_get_requests: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, buffer: *mut HttpRequestT, capacity: u32) -> u32>,
pub http_respond_raw: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64, response: *const c_char)>,
pub http_respond_html: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64, html: *const c_char)>,
pub http_request: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, address: SocketAddressT, headers: *const c_char) -> u64>,
pub http_request_status: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64) -> HttpRequestStatus>,
pub http_response: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64, size: *mut u64) -> SegmentedBufferT>,
pub http_close: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64)>,
pub ws_connect: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, address: SocketAddressT, host: *const c_char, request: *const c_char) -> u64>,
pub ws_get_requests: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, buffer: *mut WebSocketRequestT, capacity: u32) -> u32>,
pub ws_status: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64) -> WebSocketStatus>,
pub ws_recv_progress: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64, bytes: *mut u64, total: *mut u64) -> bool>,
pub ws_get_events: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64, buffer: *mut WebSocketEventT, capacity: u32) -> u32>,
pub ws_send_text_frame: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64, s: *const c_char)>,
pub ws_send_binary_frame: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64, data: *const u8, size: u64)>,
pub ws_send_segmented_binary_frame: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64, buf: *const SegmentedBufferT, size: u64)>,
pub ws_send_ping: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64)>,
pub ws_close: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64)>,
pub copy_segmented_buffer: Option<unsafe extern "C" fn(buffer: *mut c_void, segments: *const SegmentedBufferT, size: u64)>,
}
Fields§
§create: Option<unsafe extern "C" fn(a: *mut AllocatorI, socket: *mut OsSocketApi, port: u32) -> *mut WebTalkerO>
§listening_address: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, address: *mut SocketAddressT) -> bool>
§create_no_server: Option<unsafe extern "C" fn(a: *mut AllocatorI, socket: *mut OsSocketApi) -> *mut WebTalkerO>
§destroy: Option<unsafe extern "C" fn(arg1: *mut WebTalkerO)>
§receive: Option<unsafe extern "C" fn(inst: *mut WebTalkerO)>
§send: Option<unsafe extern "C" fn(inst: *mut WebTalkerO)>
§http_get_requests: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, buffer: *mut HttpRequestT, capacity: u32) -> u32>
§http_respond_raw: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64, response: *const c_char)>
§http_respond_html: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64, html: *const c_char)>
§http_request: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, address: SocketAddressT, headers: *const c_char) -> u64>
§http_request_status: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64) -> HttpRequestStatus>
§http_response: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64, size: *mut u64) -> SegmentedBufferT>
§http_close: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64)>
§ws_connect: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, address: SocketAddressT, host: *const c_char, request: *const c_char) -> u64>
§ws_get_requests: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, buffer: *mut WebSocketRequestT, capacity: u32) -> u32>
§ws_status: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64) -> WebSocketStatus>
§ws_recv_progress: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64, bytes: *mut u64, total: *mut u64) -> bool>
§ws_get_events: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64, buffer: *mut WebSocketEventT, capacity: u32) -> u32>
§ws_send_text_frame: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64, s: *const c_char)>
§ws_send_binary_frame: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64, data: *const u8, size: u64)>
§ws_send_segmented_binary_frame: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64, buf: *const SegmentedBufferT, size: u64)>
§ws_send_ping: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64)>
§ws_close: Option<unsafe extern "C" fn(inst: *mut WebTalkerO, id: u64)>
§copy_segmented_buffer: Option<unsafe extern "C" fn(buffer: *mut c_void, segments: *const SegmentedBufferT, size: u64)>
Implementations§
Source§impl WebTalkerApi
impl WebTalkerApi
pub unsafe fn create( &self, a: *mut AllocatorI, socket: *mut OsSocketApi, port: u32, ) -> *mut WebTalkerO
pub unsafe fn listening_address( &self, inst: *mut WebTalkerO, address: *mut SocketAddressT, ) -> bool
pub unsafe fn create_no_server( &self, a: *mut AllocatorI, socket: *mut OsSocketApi, ) -> *mut WebTalkerO
pub unsafe fn destroy(&self, arg1: *mut WebTalkerO)
pub unsafe fn receive(&self, inst: *mut WebTalkerO)
pub unsafe fn send(&self, inst: *mut WebTalkerO)
pub unsafe fn http_get_requests( &self, inst: *mut WebTalkerO, buffer: *mut HttpRequestT, capacity: u32, ) -> u32
pub unsafe fn http_respond_raw( &self, inst: *mut WebTalkerO, id: u64, response: *const c_char, )
pub unsafe fn http_respond_html( &self, inst: *mut WebTalkerO, id: u64, html: *const c_char, )
pub unsafe fn http_request( &self, inst: *mut WebTalkerO, address: SocketAddressT, headers: *const c_char, ) -> u64
pub unsafe fn http_request_status( &self, inst: *mut WebTalkerO, id: u64, ) -> HttpRequestStatus
pub unsafe fn http_response( &self, inst: *mut WebTalkerO, id: u64, size: *mut u64, ) -> SegmentedBufferT
pub unsafe fn http_close(&self, inst: *mut WebTalkerO, id: u64)
pub unsafe fn ws_connect( &self, inst: *mut WebTalkerO, address: SocketAddressT, host: *const c_char, request: *const c_char, ) -> u64
pub unsafe fn ws_get_requests( &self, inst: *mut WebTalkerO, buffer: *mut WebSocketRequestT, capacity: u32, ) -> u32
pub unsafe fn ws_status( &self, inst: *mut WebTalkerO, id: u64, ) -> WebSocketStatus
pub unsafe fn ws_recv_progress( &self, inst: *mut WebTalkerO, id: u64, bytes: *mut u64, total: *mut u64, ) -> bool
pub unsafe fn ws_get_events( &self, inst: *mut WebTalkerO, id: u64, buffer: *mut WebSocketEventT, capacity: u32, ) -> u32
pub unsafe fn ws_send_text_frame( &self, inst: *mut WebTalkerO, id: u64, s: *const c_char, )
pub unsafe fn ws_send_binary_frame( &self, inst: *mut WebTalkerO, id: u64, data: *const u8, size: u64, )
pub unsafe fn ws_send_segmented_binary_frame( &self, inst: *mut WebTalkerO, id: u64, buf: *const SegmentedBufferT, size: u64, )
pub unsafe fn ws_send_ping(&self, inst: *mut WebTalkerO, id: u64)
pub unsafe fn ws_close(&self, inst: *mut WebTalkerO, id: u64)
pub unsafe fn copy_segmented_buffer( &self, buffer: *mut c_void, segments: *const SegmentedBufferT, size: u64, )
Trait Implementations§
Source§impl Clone for WebTalkerApi
impl Clone for WebTalkerApi
Source§fn clone(&self) -> WebTalkerApi
fn clone(&self) -> WebTalkerApi
Returns a duplicate 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 moreSource§impl Default for WebTalkerApi
impl Default for WebTalkerApi
Source§fn default() -> WebTalkerApi
fn default() -> WebTalkerApi
Returns the “default value” for a type. Read more
impl Copy for WebTalkerApi
Auto Trait Implementations§
impl Freeze for WebTalkerApi
impl RefUnwindSafe for WebTalkerApi
impl Send for WebTalkerApi
impl Sync for WebTalkerApi
impl Unpin for WebTalkerApi
impl UnwindSafe for WebTalkerApi
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