citadel_sdk

Module remote_ext

Source
Expand description

Extension implementations endowed upon the NodeRemote Remote Protocol Extensions

This module extends the core NodeRemote functionality with high-level operations for managing connections, file transfers, and peer interactions in the Citadel Protocol network.

§Features

  • User registration and authentication
  • Connection management
  • File transfer operations
  • Virtual filesystem support
  • Peer discovery and management
  • Group communication
  • Security settings configuration

§Example

use citadel_sdk::prelude::*;

async fn example<R: Ratchet>(remote: NodeRemote<R>) -> Result<(), NetworkError> {
    // Register a new user
    let reg = remote.register_with_defaults(
        "127.0.0.1:25021",
        "John Doe",
        "john.doe",
        "password123"
    ).await?;

    // Connect to a peer
    let auth = AuthenticationRequest::credentialed("john.doe", "password123");
    let conn = remote.connect_with_defaults(auth).await?;

    // Send a file to a peer
    remote.find_target("john.doe", "peer.name")
        .await?
        .send_file("/path/to/file.txt")
        .await?;

    Ok(())
}

§Important Notes

  • All operations are asynchronous
  • Connections are automatically managed
  • File transfers support chunking
  • Virtual filesystem is encrypted
  • Peer connections require mutual registration

Modules§

Structs§

Traits§

Functions§