File tree Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,22 @@ NetworkConnectionState NBConnectionHandler::check() {
143143 return _netConnectionState;
144144}
145145
146+ void NBConnectionHandler::connect ()
147+ {
148+ if (_netConnectionState != NetworkConnectionState::INIT && _netConnectionState != NetworkConnectionState::CONNECTING)
149+ {
150+ _keep_alive = true ;
151+ changeConnectionState (NetworkConnectionState::INIT);
152+ }
153+ }
154+
155+ void NBConnectionHandler::disconnect ()
156+ {
157+ changeConnectionState (NetworkConnectionState::DISCONNECTING);
158+ _keep_alive = false ;
159+ }
160+
161+
146162/* *****************************************************************************
147163 PRIVATE MEMBER FUNCTIONS
148164 ******************************************************************************/
@@ -194,20 +210,4 @@ void NBConnectionHandler::changeConnectionState(NetworkConnectionState _newState
194210 _netConnectionState = _newState;
195211}
196212
197-
198- void NBConnectionHandler::connect () {
199- if (_netConnectionState == NetworkConnectionState::INIT || _netConnectionState == NetworkConnectionState::CONNECTING) {
200- return ;
201- }
202- _keep_alive = true ;
203- changeConnectionState (NetworkConnectionState::INIT);
204-
205- }
206- void NBConnectionHandler::disconnect () {
207- // WiFi.end();
208-
209- changeConnectionState (NetworkConnectionState::DISCONNECTING);
210- _keep_alive = false ;
211- }
212-
213- #endif /* #ifdef BOARD_HAS_NB */
213+ #endif /* #ifdef BOARD_HAS_NB */
You can’t perform that action at this time.
0 commit comments