File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -135,13 +135,27 @@ class NetworkInterface: public DNS {
135
135
136
136
/* * Start the interface.
137
137
*
138
- * @return NSAPI_ERROR_OK on success, negative error code on failure.
138
+ * This blocks until connection is established, but asynchronous operation can be enabled
139
+ * by calling NetworkInterface::set_blocking(false).
140
+ *
141
+ * In asynchronous mode this starts the connection sequence and returns immediately.
142
+ * Status of the connection can then checked from NetworkInterface::get_connection_status()
143
+ * or from status callbacks.
144
+ *
145
+ * @return NSAPI_ERROR_OK on success, or if asynchronous operation started.
146
+ * @return NSAPI_ERROR_ALREADY if asynchronous connect operation already ongoing.
147
+ * @return NSAPI_ERROR_IS_CONNECTED if interface is already connected.
148
+ * @return negative error code on failure.
139
149
*/
140
150
virtual nsapi_error_t connect () = 0;
141
151
142
152
/* * Stop the interface.
143
153
*
144
- * @return NSAPI_ERROR_OK on success, negative error code on failure.
154
+ * This blocks until interface is disconnected, unless interface is set to
155
+ * asynchronous (non-blocking) mode by calling NetworkInterface::set_blocking(false).
156
+ *
157
+ * @return NSAPI_ERROR_OK on success, or if asynchronous operation started.
158
+ @ @return negative error code on failure.
145
159
*/
146
160
virtual nsapi_error_t disconnect () = 0;
147
161
You can’t perform that action at this time.
0 commit comments