Add dummy secure server API

For AsyncTCP compatibility with ESPAsyncWebServer.
This commit is contained in:
Alex Villacís Lasso
2021-10-13 17:07:55 -05:00
parent 2e54cf7e3e
commit 0a20a6989f

View File

@@ -250,6 +250,10 @@ class AsyncClient : public AsyncSocketBase
friend void _tcpsock_dns_found(const char * name, struct ip_addr * ipaddr, void * arg);
};
#if ASYNC_TCP_SSL_ENABLED
typedef std::function<int(void* arg, const char *filename, uint8_t **buf)> AcSSlFileHandler;
#endif
class AsyncServer : public AsyncSocketBase
{
public:
@@ -257,6 +261,11 @@ class AsyncServer : public AsyncSocketBase
AsyncServer(uint16_t port);
~AsyncServer();
void onClient(AcConnectHandler cb, void* arg);
#if ASYNC_TCP_SSL_ENABLED
// Dummy, so it compiles with ESP Async WebServer library enabled.
void onSslFileRequest(AcSSlFileHandler cb, void* arg) {};
void beginSecure(const char *cert, const char *private_key_file, const char *password) {};
#endif
void begin();
void end();