pub fn use_web_sockets(handle: Handle) {
    let handle = Arc::new(handle);
    let sock_factory = C4SocketFactory {
        context: Arc::into_raw(handle) as *mut c_void,
        framing: kC4NoFraming as C4SocketFraming,

        open: Some(ws_open),
        write: Some(ws_write),
        completedReceive: Some(ws_completed_receive),
        close: None,
        requestClose: Some(ws_request_close),
        dispose: Some(ws_dispose),
    };

    unsafe { c4socket_registerFactory(sock_factory) };
}
/// use embedded web-socket library
use embedded web-socket library
use embedded web - socket library
pub fn use_web_sockets(handle: Handle) {
    let handle = Arc::new(handle);
    let sock_factory = C4SocketFactory {
        context: Arc::into_raw(handle) as *mut c_void,
        framing: kC4NoFraming as C4SocketFraming,
        open: Some(ws_open),
        write: Some(ws_write),
        completedReceive: Some(ws_completed_receive),
        close: None,
        requestClose: Some(ws_request_close),
        dispose: Some(ws_dispose),
    };
    unsafe { c4socket_registerFactory(sock_factory) };
}
pub fn use_web_sockets ( handle : Handle ) { let handle = Arc :: new ( handle ) ; let sock_factory = C4SocketFactory { context : Arc :: into_raw ( handle ) as * mut c_void , framing : kC4NoFraming as C4SocketFraming , open : Some ( ws_open ) , write : Some ( ws_write ) , completedReceive : Some ( ws_completed_receive ) , close : None , requestClose : Some ( ws_request_close ) , dispose : Some ( ws_dispose ) , } ; unsafe { c4socket_registerFactory ( sock_factory ) } ; }
use embedded web-socket library
use embedded web - socket library
handle
Handle
handle
Handle