mirror of
				https://github.com/eledio-devices/thirdparty-AsyncTCPSock.git
				synced 2025-10-31 00:32:37 +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); |     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 | class AsyncServer : public AsyncSocketBase | ||||||
| { | { | ||||||
|   public: |   public: | ||||||
| @@ -257,6 +261,11 @@ class AsyncServer : public AsyncSocketBase | |||||||
|     AsyncServer(uint16_t port); |     AsyncServer(uint16_t port); | ||||||
|     ~AsyncServer(); |     ~AsyncServer(); | ||||||
|     void onClient(AcConnectHandler cb, void* arg); |     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 begin(); | ||||||
|     void end(); |     void end(); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user