{
  "name": "scorpiox-lanspeed",
  "version": "1.0.0",
  "description": "Pure C LAN speed test client DLL — throughput, latency, jitter with 10 Hz live tick callbacks and <30ms cancellation. Protocol peer: scorpiox-lanspeed-server.",
  "exports": [
    {
      "name": "lanspeed_init",
      "return": "int",
      "csharp_return": "int",
      "args": []
    },
    {
      "name": "lanspeed_cleanup",
      "return": "void",
      "csharp_return": "void",
      "args": []
    },
    {
      "name": "lanspeed_ping",
      "return": "double",
      "csharp_return": "double",
      "args": [
        {"name": "host", "type": "const char*", "csharp_type": "string", "marshal": "UnmanagedType.LPUTF8Str"},
        {"name": "port", "type": "int", "csharp_type": "int"},
        {"name": "count", "type": "int", "csharp_type": "int"}
      ]
    },
    {
      "name": "lanspeed_download",
      "return": "double",
      "csharp_return": "double",
      "args": [
        {"name": "host", "type": "const char*", "csharp_type": "string", "marshal": "UnmanagedType.LPUTF8Str"},
        {"name": "port", "type": "int", "csharp_type": "int"},
        {"name": "duration_ms", "type": "int", "csharp_type": "int"}
      ]
    },
    {
      "name": "lanspeed_upload",
      "return": "double",
      "csharp_return": "double",
      "args": [
        {"name": "host", "type": "const char*", "csharp_type": "string", "marshal": "UnmanagedType.LPUTF8Str"},
        {"name": "port", "type": "int", "csharp_type": "int"},
        {"name": "duration_ms", "type": "int", "csharp_type": "int"}
      ]
    },
    {
      "name": "lanspeed_run_all",
      "return": "int",
      "csharp_return": "int",
      "args": [
        {"name": "host", "type": "const char*", "csharp_type": "string", "marshal": "UnmanagedType.LPUTF8Str"},
        {"name": "port", "type": "int", "csharp_type": "int"},
        {"name": "duration_ms", "type": "int", "csharp_type": "int"}
      ]
    },
    {
      "name": "lanspeed_set_tick",
      "return": "void",
      "csharp_return": "void",
      "args": [
        {"name": "cb", "type": "lanspeed_tick_cb", "csharp_type": "Action<string,double,int>", "marshal": "delegate(void (const char* phase, double live_mbps, int pct))"}
      ]
    },
    {
      "name": "lanspeed_cancel",
      "return": "void",
      "csharp_return": "void",
      "args": []
    },
    {
      "name": "lanspeed_result_json",
      "return": "const char*",
      "csharp_return": "IntPtr",
      "note": "static buffer — marshal with Marshal.PtrToStringAnsi(IntPtr)",
      "args": []
    },
    {
      "name": "lanspeed_last_error",
      "return": "const char*",
      "csharp_return": "IntPtr",
      "note": "static buffer — marshal with Marshal.PtrToStringAnsi(IntPtr)",
      "args": []
    }
  ]
}
