Files
wadamesh/web/compat/WiFiClient.h
T
Kaj SchittecatandClaude Opus 5.5 963c75df5d web: host build of the real touch UI (SDL2, demo backend)
The touch UI (src/ui-touch, unmodified apart from WADA_WEB board guards)
builds for macOS with CMake and runs in an SDL2 window: a compat layer
for the Arduino/ESP-IDF/FreeRTOS surface, a MyMesh stand-in with a
MeshBackend interface (DemoBackend now), and the web board's SDL
display/touch/keyboard drivers. WEB_BUILD.md follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 12:06:04 +02:00

29 lines
1.3 KiB
C++

#pragma once
// A TCP client that never connects (no sockets in phase 1; WebSocket/fetch in phase 2/3).
#include "Arduino.h"
#include "arduino/Client.h"
class WiFiClient : public Client {
public:
WiFiClient() {}
int connect(IPAddress ip, uint16_t port) override { (void)ip; (void)port; return 0; }
int connect(IPAddress ip, uint16_t port, int32_t timeout) { (void)ip; (void)port; (void)timeout; return 0; }
int connect(const char* host, uint16_t port) override { (void)host; (void)port; return 0; }
int connect(const char* host, uint16_t port, int32_t timeout) { (void)host; (void)port; (void)timeout; return 0; }
size_t write(uint8_t) override { return 0; }
size_t write(const uint8_t*, size_t) override { return 0; }
int available() override { return 0; }
int read() override { return -1; }
int read(uint8_t*, size_t) override { return -1; }
int peek() override { return -1; }
void flush() override {}
void stop() override {}
uint8_t connected() override { return 0; }
operator bool() override { return false; }
int fd() const { return -1; }
int setNoDelay(bool) { return 0; }
int setTimeout(uint32_t) { return 0; }
IPAddress remoteIP() const { return IPAddress((uint32_t)0); }
uint16_t remotePort() const { return 0; }
using Print::write;
};