Skip to content

xconnio/xconn-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WAMP for Rust

This library implements the WAMP protocol. It supports both sync and async variant. The API is identical between the two implementations.

use xconn::async_::client::connect_anonymous;

#[tokio::main]
async fn main() {
    // connecting without any authentication
    let session = connect_anonymous("ws://localhost:8080/ws", "realm1")
        .await
        .unwrap_or_else(|e| panic!("{e}"));

    // build a call request
    let request = CallRequest::new("io.xconn.echo").arg(1).kwarg("name", "John");

    // pass the request and get the response.
    let response = session.call(request).await.unwrap();
    println!("args={:?}, kwargs={:?}", response.args, response.kwargs);
}

About

WAMP client for Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published