Allow definition of custom network interfaces (#921)
* Allow definition of custom network interfaces * Create network client interface class * Change to PIMPL approach * Add example for custom network clients Why: - Show users how to use multiple network interfaces This change addresses the need by: - Adding an example PIO project to use Wi-Fi and GSM/LTE * Add WebSockets prefix to normal and secure client Why: - Avoid name collision - Fix broken reconnect change This change addresses the need by: - Adding WebSockets prefix to all custom clients - Marking custom client as secure in clientDisconnect() - Remove broken fix for reconnecting
This commit is contained in:
@@ -525,7 +525,7 @@ void WebSocketsClient::messageReceived(WSclient_t * client, WSopcode_t opcode, u
|
||||
void WebSocketsClient::clientDisconnect(WSclient_t * client) {
|
||||
bool event = false;
|
||||
|
||||
#if(WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266) || (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP32) || (WEBSOCKETS_NETWORK_TYPE == NETWORK_RP2040)
|
||||
#if(WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266) || (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP32) || (WEBSOCKETS_NETWORK_TYPE == NETWORK_RP2040) || (WEBSOCKETS_NETWORK_TYPE == NETWORK_CUSTOM)
|
||||
if(client->isSSL && client->ssl) {
|
||||
if(client->ssl->connected()) {
|
||||
client->ssl->flush();
|
||||
|
||||
Reference in New Issue
Block a user