27 lines
610 B
Markdown
27 lines
610 B
Markdown
# Utilisation - sdk_relay
|
|
|
|
## Démarrage rapide
|
|
|
|
- Démarrer le service (Docker ou binaire)
|
|
- Vérifier `GET /health`
|
|
- Connecter un client WebSocket à `ws://host:8090`
|
|
|
|
## WebSocket
|
|
|
|
- Envoyer un handshake JSON avec `type=handshake`
|
|
- Recevoir `handshake_response`
|
|
- S'abonner aux notifications si nécessaire (`subscribe`)
|
|
|
|
## HTTP
|
|
|
|
- `GET /health` : santé
|
|
- `GET /metrics` : métriques
|
|
- `GET /relays` : relais connus
|
|
- `POST /sync/force` : forcer une synchronisation
|
|
|
|
## Bonnes pratiques
|
|
|
|
- Reconnexion automatique côté client
|
|
- Heartbeat régulier (ping/pong)
|
|
- Limiter la taille des messages (< 1MB)
|