Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.oxd.sh/llms.txt

Use this file to discover all available pages before exploring further.

Prerequisites

  • An Accel API key (contact us to request access)
  • Platform-specific SDK artifacts (shared library + C header)

1. Download the SDK

Each platform package contains:
FileDescription
liboxaccel.so / .dylib / .dllShared library
liboxaccel.a / .libStatic library
oxaccel.hC header
SHA256SUMSIntegrity checksums
macOS ships a universal binary — a single file that works on both Intel and Apple Silicon.
#include "oxaccel.h"
// Link: -loxaccel

3. Initialize, connect, send

#include "oxaccel.h"

int main() {
    OxAccelConfig config = {
        .api_key    = "your-api-key",
        .relay_host = "relay.oxd.sh",
        .relay_port = 51820,
        .enable_fec         = true,
        .enable_compression = true,
        .enable_multipath   = true,
    };

    // Create context
    OxAccel *ctx = ox_accel_create(&config);
    if (!ctx) return 1;

    // Connect to relay
    OxAccelError err = ox_accel_connect(ctx);
    if (err != OxAccelError_Ok) {
        ox_accel_destroy(ctx);
        return 1;
    }

    // Send data
    uint8_t payload[] = {0x01, 0x02, 0x03};
    ox_accel_send(ctx, payload, sizeof(payload));

    // Receive data
    uint8_t buf[65536];
    size_t received = 0;
    ox_accel_recv(ctx, buf, sizeof(buf), &received);

    // Check stats
    AccelStats stats;
    ox_accel_stats(ctx, &stats);
    printf("Sent: %lu packets, %lu bytes\n",
           stats.packets_sent, stats.bytes_sent);

    // Cleanup
    ox_accel_destroy(ctx);
    return 0;
}

Configuration options

FieldTypeDefaultDescription
api_keyconst char*requiredYour Accel API key
relay_hostconst char*"127.0.0.1"Relay server hostname
relay_portuint16_t51820Relay server port
enable_fecboolfalseEnable forward error correction
enable_compressionboolfalseEnable payload compression
enable_multipathboolfalseEnable multi-path routing
The context handle (OxAccel*) is thread-safe for send/recv/stats. However, ox_accel_destroy must not be called concurrently with any other function.

Next steps

API Reference

Full function documentation with safety guarantees.

Your Language

Copy-paste examples for C#, Go, Python, and C++.