Metadata-Version: 2.4
Name: rmbt-client
Version: 1.0.0
Summary: RMBT network measurement client — performs ping, download, and upload speed tests against an RMBT measurement server
Project-URL: Homepage, https://www.netztest.at
Project-URL: Repository, https://github.com/raaaimund/open-rmbt-client-cli
Project-URL: Issues, https://github.com/raaaimund/open-rmbt-client-cli/issues
Author: RTR-Netztest
License: Apache-2.0
Keywords: measurement,network,netztest,rmbt,speedtest
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet
Classifier: Topic :: System :: Networking
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# rmbt-client (Python)

RMBT network measurement client written in Python. Performs ping, download, and upload phases against an RMBT measurement server and submits results to the control server.

## Requirements

- Python 3.7+
- No third-party dependencies (stdlib only: `ssl`, `socket`, `threading`, `urllib`)

## Usage

```sh
python -m rmbt_client --host https://measure.example.com
```

Run with a specific thread count and duration:

```sh
python -m rmbt_client --host https://measure.example.com --threads 4 --duration 10
```

Skip TLS verification against a local test server:

```sh
python -m rmbt_client --host https://localhost:8080 --no-tls-verify
```

### Options

| Flag | Description |
|------|-------------|
| `-h`, `--host URL` | Control server base URL **(required)** |
| `-p`, `--port PORT` | Override test server port |
| `-u`, `--uuid UUID` | Client UUID (uses/creates `~/.rmbt_client_uuid` if omitted) |
| `-t`, `--threads N` | Force thread count for download and upload (overrides pre-test) |
| `-d`, `--duration SECS` | Test duration in seconds (default: from control server) |
| `--ws` | Use WebSocket (RMBTws) framing instead of plain HTTP upgrade |
| `--http` | Use plain HTTP upgrade (RMBThttp) — overrides auto-detection |
| `--no-tls-verify` | Skip TLS certificate verification (insecure) |
| `--debug` | Print control server request/response JSON |
| `--intermediate` | Print upload throughput every 40 ms per thread |
| `--help` | Print help |

## Protocol

1. POST `/RMBTControlServer/settings` → register client, receive UUID
2. POST `/RMBTControlServer/testRequest` → receive token, server address, thread count
3. Pre-test: 2-second single-thread GETCHUNKS download to determine chunk size and thread counts
4. Ping: 1 s / 10–100 pings
5. Download: multi-threaded GETTIME, all threads start simultaneously via `threading.Barrier`
6. Upload: multi-threaded PUTNORESULT
7. POST `/RMBTControlServer/result`

Supports both **RMBThttp** (plain HTTP upgrade) and **RMBTws** (WebSocket) variants.  
TLS via the stdlib `ssl` module; control server HTTPS via `urllib.request`.
