158def main() -> int:
159 """Main entry point."""
160 parser = argparse.ArgumentParser(description="Test FastLED Network example")
161 parser.add_argument("--host", default="localhost", help="Server host")
162 parser.add_argument("--port", type=int, default=8080, help="Server port")
163 parser.add_argument("--requests", type=int, default=5, help="Number of requests")
164 args = parser.parse_args()
165
166 config = TestConfig(host=args.host, port=args.port, num_requests=args.requests)
167
168 console.print("[bold]FastLED Network Example Test Client[/bold]")
169 console.print(f"Server: http://{config.host}:{config.port}\n")
170
171
172 if not wait_for_server(config):
173 console.print("\nERROR: Server not available", style="red bold")
174 console.print("\nTroubleshooting:")
175 console.print("1. Compile: bash compile posix --examples Server")
176 console.print("2. Run: .build/meson-quick/examples/Server.exe")
177 return 1
178
179
180 results = run_tests(config)
181
182
183 display_statistics(results)
184
185 return 0 if all(r.success for r in results) else 1
186
187