File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 29
29
#include < Client.h>
30
30
#include < Udp.h>
31
31
#include " ConnectionHandlerDefinitions.h"
32
+ #include " settings/settings.h"
32
33
33
34
/* *****************************************************************************
34
35
TYPEDEFS
@@ -77,6 +78,17 @@ class ConnectionHandler {
77
78
void addDisconnectCallback (OnNetworkEventCallback callback) __attribute__((deprecated));
78
79
void addErrorCallback (OnNetworkEventCallback callback) __attribute__((deprecated));
79
80
81
+ /* *
82
+ * Update the interface settings. This can be performed only when the interface is
83
+ * in INIT state. otherwise nothing is performed. The type of the interface should match
84
+ * the type of the settings provided
85
+ */
86
+ inline void updateSetting (const models::NetworkSetting& s) {
87
+ if (_current_net_connection_state == NetworkConnectionState::INIT && s.type == _interface) {
88
+ memcpy (&_settings, &s, sizeof (s));
89
+ }
90
+ }
91
+
80
92
protected:
81
93
82
94
bool _keep_alive;
@@ -88,6 +100,11 @@ class ConnectionHandler {
88
100
virtual NetworkConnectionState update_handleDisconnecting () = 0;
89
101
virtual NetworkConnectionState update_handleDisconnected () = 0;
90
102
103
+ <<<<<<< HEAD:src/ConnectionHandlerInterface.h
104
+ =======
105
+ models::NetworkSetting _settings;
106
+
107
+ >>>>>>> 8ee4dcd (readapting ConnectionHandlerInterface to use setting struct ):src/Arduino_ConnectionHandlerInterface.h
91
108
private:
92
109
93
110
unsigned long _lastConnectionTickTime;
You can’t perform that action at this time.
0 commit comments