3
3
4
4
extern uint8_t networkGetType (uint8_t user);
5
5
6
- class RTKNetworkClient : public Client
6
+ class RTKNetworkClient : public NetworkClient
7
7
{
8
8
protected:
9
- Client *_client; // Ethernet or WiFi client
9
+ NetworkClient *_client; // Ethernet or WiFi client
10
10
bool _friendClass;
11
11
uint8_t _networkType;
12
12
13
13
public:
14
14
// ------------------------------
15
15
// Create the network client
16
16
// ------------------------------
17
- RTKNetworkClient (Client *client, uint8_t networkType)
17
+ RTKNetworkClient (NetworkClient *client, uint8_t networkType)
18
18
{
19
19
_friendClass = true ;
20
20
_networkType = networkType;
@@ -31,7 +31,7 @@ class RTKNetworkClient : public Client
31
31
else
32
32
#endif // COMPILE_ETHERNET
33
33
#if defined(COMPILE_WIFI)
34
- _client = new WiFiClient ;
34
+ _client = new NetworkClient ;
35
35
#else // COMPILE_WIFI
36
36
_client = nullptr ;
37
37
#endif // COMPILE_WIFI
@@ -165,7 +165,7 @@ class RTKNetworkClient : public Client
165
165
#endif // COMPILE_ETHERNET
166
166
#if defined(COMPILE_WIFI)
167
167
if (_networkType == NETWORK_TYPE_WIFI)
168
- return ((WiFiClient *)_client)->remoteIP ();
168
+ return ((NetworkClient *)_client)->remoteIP ();
169
169
#endif // COMPILE_WIFI
170
170
return IPAddress ((uint32_t )0 );
171
171
}
@@ -182,7 +182,7 @@ class RTKNetworkClient : public Client
182
182
#endif // COMPILE_ETHERNET
183
183
#if defined(COMPILE_WIFI)
184
184
if (_networkType == NETWORK_TYPE_WIFI)
185
- return ((WiFiClient *)_client)->remotePort ();
185
+ return ((NetworkClient *)_client)->remotePort ();
186
186
#endif // COMPILE_WIFI
187
187
return 0 ;
188
188
}
@@ -266,7 +266,7 @@ class NetworkEthernetClient : public RTKNetworkClient
266
266
class NetworkWiFiClient : public RTKNetworkClient
267
267
{
268
268
protected:
269
- WiFiClient _client;
269
+ NetworkClient _client;
270
270
271
271
public:
272
272
NetworkWiFiClient () : RTKNetworkClient(&_client, NETWORK_TYPE_WIFI)
@@ -286,7 +286,7 @@ class NetworkWiFiClient : public RTKNetworkClient
286
286
class NetworkSecureWiFiClient : public RTKNetworkClient
287
287
{
288
288
protected:
289
- WiFiClientSecure _client;
289
+ NetworkClientSecure _client;
290
290
291
291
public:
292
292
NetworkSecureWiFiClient () : _client{WiFiClientSecure ()}, RTKNetworkClient(&_client, NETWORK_TYPE_WIFI)
@@ -302,7 +302,7 @@ class NetworkSecureWiFiClient : public RTKNetworkClient
302
302
this ->~RTKNetworkClient ();
303
303
}
304
304
305
- WiFiClientSecure *getClient ()
305
+ NetworkClientSecure *getClient ()
306
306
{
307
307
return &_client;
308
308
}
0 commit comments