No description
Find a file
2023-10-05 21:19:28 +02:00
js revive 2023-10-02 14:09:07 +02:00
src try conn 2023-10-05 21:19:28 +02:00
.gitignore init 2023-10-01 23:48:52 +02:00
Cargo.lock init 2023-10-01 23:48:52 +02:00
Cargo.toml init 2023-10-01 23:48:52 +02:00
readme.md readme 2023-10-02 14:56:09 +02:00

quad-ws

WebSocket plugin for miniquad.

Testet on:

  • Web: webjs WebSocket
  • Android
  • Linux: websocket
  • macOS
  • Windows
  • iOS

Other Platforms could work, but weren't tested.

Usage

let client = QuadWs::new("ws://example.com");
if client.connected() {
    client.write(vec![0, 1, 2, 3, 3]); // connected check is optional / write returns if sending was successfull.
} else {
    client.revive(); // trys to revive the connection.
}

if let Some(buffer) = client.read(){
    //process buffer
}

client.close(); // permanently close the connection.

Attribution

crate websocket is used for none wasm Implementation.