mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-06-14 11:56:32 +03:00
add TLS support for all boards
This commit is contained in:
49
lib_standalone/WiFiClient.h
Normal file
49
lib_standalone/WiFiClient.h
Normal file
@@ -0,0 +1,49 @@
|
||||
// standalone stub for WiFiClient (no-op networking on host build)
|
||||
|
||||
#ifndef WiFiClient_h
|
||||
#define WiFiClient_h
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "Arduino.h"
|
||||
#include <ClientPosixIPAddress.h>
|
||||
|
||||
class WiFiClient {
|
||||
public:
|
||||
WiFiClient() = default;
|
||||
|
||||
int connect(IPAddress, uint16_t) {
|
||||
return 0;
|
||||
}
|
||||
int connect(const char *, uint16_t) {
|
||||
return 0;
|
||||
}
|
||||
bool connected() {
|
||||
return false;
|
||||
}
|
||||
int available() {
|
||||
return 0;
|
||||
}
|
||||
int read() {
|
||||
return -1;
|
||||
}
|
||||
int read(uint8_t *, size_t) {
|
||||
return 0;
|
||||
}
|
||||
size_t write(uint8_t) {
|
||||
return 0;
|
||||
}
|
||||
size_t write(const uint8_t *, size_t) {
|
||||
return 0;
|
||||
}
|
||||
void stop() {
|
||||
}
|
||||
|
||||
// ESP32 socket option passthrough (e.g. TCP_NODELAY)
|
||||
int setSocketOption(int, int, const void *, size_t) {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // WiFiClient_h
|
||||
Reference in New Issue
Block a user