libwisp 0.2.0

a simple-to-use wisp rust library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use libwisp::{WispContext, WispSetServer, WispGetServer, WispClose};
use tokio;

#[tokio::main]
async fn main() {
    let mut ctx = WispContext::new();

    // connect to a wisp server
    WispSetServer(&mut ctx, "wss://wispserver.dev/wisp/").await;

    // print current connected server url
    let server_url = WispGetServer(&ctx);
    println!("connected to wisp server: {}", server_url);

    // close connection for good practice
    WispClose(&mut ctx).await;
}