WebTalkerApi

Struct WebTalkerApi 

Source
#[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

Source

pub unsafe fn create( &self, a: *mut AllocatorI, socket: *mut OsSocketApi, port: u32, ) -> *mut WebTalkerO

Source

pub unsafe fn listening_address( &self, inst: *mut WebTalkerO, address: *mut SocketAddressT, ) -> bool

Source

pub unsafe fn create_no_server( &self, a: *mut AllocatorI, socket: *mut OsSocketApi, ) -> *mut WebTalkerO

Source

pub unsafe fn destroy(&self, arg1: *mut WebTalkerO)

Source

pub unsafe fn receive(&self, inst: *mut WebTalkerO)

Source

pub unsafe fn send(&self, inst: *mut WebTalkerO)

Source

pub unsafe fn http_get_requests( &self, inst: *mut WebTalkerO, buffer: *mut HttpRequestT, capacity: u32, ) -> u32

Source

pub unsafe fn http_respond_raw( &self, inst: *mut WebTalkerO, id: u64, response: *const c_char, )

Source

pub unsafe fn http_respond_html( &self, inst: *mut WebTalkerO, id: u64, html: *const c_char, )

Source

pub unsafe fn http_request( &self, inst: *mut WebTalkerO, address: SocketAddressT, headers: *const c_char, ) -> u64

Source

pub unsafe fn http_request_status( &self, inst: *mut WebTalkerO, id: u64, ) -> HttpRequestStatus

Source

pub unsafe fn http_response( &self, inst: *mut WebTalkerO, id: u64, size: *mut u64, ) -> SegmentedBufferT

Source

pub unsafe fn http_close(&self, inst: *mut WebTalkerO, id: u64)

Source

pub unsafe fn ws_connect( &self, inst: *mut WebTalkerO, address: SocketAddressT, host: *const c_char, request: *const c_char, ) -> u64

Source

pub unsafe fn ws_get_requests( &self, inst: *mut WebTalkerO, buffer: *mut WebSocketRequestT, capacity: u32, ) -> u32

Source

pub unsafe fn ws_status( &self, inst: *mut WebTalkerO, id: u64, ) -> WebSocketStatus

Source

pub unsafe fn ws_recv_progress( &self, inst: *mut WebTalkerO, id: u64, bytes: *mut u64, total: *mut u64, ) -> bool

Source

pub unsafe fn ws_get_events( &self, inst: *mut WebTalkerO, id: u64, buffer: *mut WebSocketEventT, capacity: u32, ) -> u32

Source

pub unsafe fn ws_send_text_frame( &self, inst: *mut WebTalkerO, id: u64, s: *const c_char, )

Source

pub unsafe fn ws_send_binary_frame( &self, inst: *mut WebTalkerO, id: u64, data: *const u8, size: u64, )

Source

pub unsafe fn ws_send_segmented_binary_frame( &self, inst: *mut WebTalkerO, id: u64, buf: *const SegmentedBufferT, size: u64, )

Source

pub unsafe fn ws_send_ping(&self, inst: *mut WebTalkerO, id: u64)

Source

pub unsafe fn ws_close(&self, inst: *mut WebTalkerO, id: u64)

Source

pub unsafe fn copy_segmented_buffer( &self, buffer: *mut c_void, segments: *const SegmentedBufferT, size: u64, )

Trait Implementations§

Source§

impl Api for WebTalkerApi

Source§

impl Clone for WebTalkerApi

Source§

fn clone(&self) -> WebTalkerApi

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for WebTalkerApi

Source§

fn default() -> WebTalkerApi

Returns the “default value” for a type. Read more
Source§

impl Copy for WebTalkerApi

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.