Skip to content

Commit 0a20a69

Browse files
committed
Add dummy secure server API
For AsyncTCP compatibility with ESPAsyncWebServer.
1 parent 2e54cf7 commit 0a20a69

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/AsyncTCP.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,22 @@ class AsyncClient : public AsyncSocketBase
250250
friend void _tcpsock_dns_found(const char * name, struct ip_addr * ipaddr, void * arg);
251251
};
252252

253+
#if ASYNC_TCP_SSL_ENABLED
254+
typedef std::function<int(void* arg, const char *filename, uint8_t **buf)> AcSSlFileHandler;
255+
#endif
256+
253257
class AsyncServer : public AsyncSocketBase
254258
{
255259
public:
256260
AsyncServer(IPAddress addr, uint16_t port);
257261
AsyncServer(uint16_t port);
258262
~AsyncServer();
259263
void onClient(AcConnectHandler cb, void* arg);
264+
#if ASYNC_TCP_SSL_ENABLED
265+
// Dummy, so it compiles with ESP Async WebServer library enabled.
266+
void onSslFileRequest(AcSSlFileHandler cb, void* arg) {};
267+
void beginSecure(const char *cert, const char *private_key_file, const char *password) {};
268+
#endif
260269
void begin();
261270
void end();
262271

0 commit comments

Comments
 (0)