mirror of
				https://github.com/eledio-devices/thirdparty-AsyncTCPSock.git
				synced 2025-10-31 08:42:38 +01:00 
			
		
		
		
	Add dummy secure server API
For AsyncTCP compatibility with ESPAsyncWebServer.
This commit is contained in:
		| @@ -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(); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user