#!/bin/bash # Script to test TCP connect/disconnect functionality BASE_URL="http://127.0.0.1:8888" echo "=== Test 1: Connect to TCP server ===" echo "GET /api/connect" curl -s "$BASE_URL/api/connect" echo "" echo "" echo "=== Test 2: Attempt reconnect (already connected) ===" echo "GET /api/connect" curl -s "$BASE_URL/api/connect" echo "" echo "" echo "=== Test 3: Disconnect from TCP server ===" echo "GET /api/disconnect" curl -s "$BASE_URL/api/disconnect" echo "" echo "" echo "=== Test 4: Attempt disconnect (already disconnected) ===" echo "GET /api/disconnect" curl -s "$BASE_URL/api/disconnect" echo "" echo "" echo "=== Test 5: Reconnect after disconnect ===" echo "GET /api/connect" curl -s "$BASE_URL/api/connect" echo "" echo "" echo "=== Test 6: Final disconnect ===" echo "GET /api/disconnect" curl -s "$BASE_URL/api/disconnect" echo ""