@@ -54,10 +54,10 @@ class NetworkStack: public DNS {
54
54
* will be resolve using a UDP socket on the stack.
55
55
*
56
56
* @param host Hostname to resolve
57
- * @param address Destination for the host SocketAddress
57
+ * @param address Pointer to a SocketAddress to store the result.
58
58
* @param version IP version of address to resolve, NSAPI_UNSPEC indicates
59
59
* version is chosen by the stack (defaults to NSAPI_UNSPEC)
60
- * @return 0 on success, negative error code on failure
60
+ * @return NSAPI_ERROR_OK on success, negative error code on failure
61
61
*/
62
62
virtual nsapi_error_t gethostbyname (const char *host,
63
63
SocketAddress *address, nsapi_version_t version = NSAPI_UNSPEC);
@@ -72,7 +72,7 @@ class NetworkStack: public DNS {
72
72
* The callback should not perform expensive operations such as socket recv/send
73
73
* calls or blocking operations.
74
74
*
75
- * @param status 0 on success, negative error code on failure
75
+ * @param status NSAPI_ERROR_OK on success, negative error code on failure
76
76
* @param address On success, destination for the host SocketAddress
77
77
*/
78
78
typedef mbed::Callback<void (nsapi_error_t result, SocketAddress *address)> hostbyname_cb_t ;
@@ -107,14 +107,14 @@ class NetworkStack: public DNS {
107
107
* When translation is cancelled, callback will not be called.
108
108
*
109
109
* @param id Unique id of the hostname translation operation
110
- * @return 0 on success, negative error code on failure
110
+ * @return NSAPI_ERROR_OK on success, negative error code on failure
111
111
*/
112
112
virtual nsapi_error_t gethostbyname_async_cancel (int id);
113
113
114
114
/* * Add a domain name server to list of servers to query
115
115
*
116
116
* @param address Destination for the host address
117
- * @return 0 on success, negative error code on failure
117
+ * @return NSAPI_ERROR_OK on success, negative error code on failure
118
118
*/
119
119
virtual nsapi_error_t add_dns_server (const SocketAddress &address);
120
120
@@ -125,7 +125,7 @@ class NetworkStack: public DNS {
125
125
*
126
126
* @param index Index of the DNS server, starts from zero
127
127
* @param address Destination for the host address
128
- * @return 0 on success, negative error code on failure
128
+ * @return NSAPI_ERROR_OK on success, negative error code on failure
129
129
*/
130
130
virtual nsapi_error_t get_dns_server (int index, SocketAddress *address);
131
131
@@ -142,7 +142,7 @@ class NetworkStack: public DNS {
142
142
* @param optname Level-specific option name
143
143
* @param optval Option value
144
144
* @param optlen Length of the option value
145
- * @return 0 on success, negative error code on failure
145
+ * @return NSAPI_ERROR_OK on success, negative error code on failure
146
146
*/
147
147
virtual nsapi_error_t setstackopt (int level, int optname, const void *optval, unsigned optlen);
148
148
@@ -156,7 +156,7 @@ class NetworkStack: public DNS {
156
156
* @param optname Level-specific option name
157
157
* @param optval Destination for option value
158
158
* @param optlen Length of the option value
159
- * @return 0 on success, negative error code on failure
159
+ * @return NSAPI_ERROR_OK on success, negative error code on failure
160
160
*/
161
161
virtual nsapi_error_t getstackopt (int level, int optname, void *optval, unsigned *optlen);
162
162
@@ -182,7 +182,7 @@ class NetworkStack: public DNS {
182
182
*
183
183
* @param handle Destination for the handle to a newly created socket
184
184
* @param proto Protocol of socket to open, NSAPI_TCP or NSAPI_UDP
185
- * @return 0 on success, negative error code on failure
185
+ * @return NSAPI_ERROR_OK on success, negative error code on failure
186
186
*/
187
187
virtual nsapi_error_t socket_open (nsapi_socket_t *handle, nsapi_protocol_t proto) = 0;
188
188
@@ -192,7 +192,7 @@ class NetworkStack: public DNS {
192
192
* with the socket.
193
193
*
194
194
* @param handle Socket handle
195
- * @return 0 on success, negative error code on failure
195
+ * @return NSAPI_ERROR_OK on success, negative error code on failure
196
196
*/
197
197
virtual nsapi_error_t socket_close (nsapi_socket_t handle) = 0;
198
198
@@ -203,7 +203,7 @@ class NetworkStack: public DNS {
203
203
*
204
204
* @param handle Socket handle
205
205
* @param address Local address to bind
206
- * @return 0 on success, negative error code on failure.
206
+ * @return NSAPI_ERROR_OK on success, negative error code on failure.
207
207
*/
208
208
virtual nsapi_error_t socket_bind (nsapi_socket_t handle, const SocketAddress &address) = 0;
209
209
@@ -215,7 +215,7 @@ class NetworkStack: public DNS {
215
215
* @param handle Socket handle
216
216
* @param backlog Number of pending connections that can be queued
217
217
* simultaneously
218
- * @return 0 on success, negative error code on failure
218
+ * @return NSAPI_ERROR_OK on success, negative error code on failure
219
219
*/
220
220
virtual nsapi_error_t socket_listen (nsapi_socket_t handle, int backlog) = 0;
221
221
@@ -226,7 +226,7 @@ class NetworkStack: public DNS {
226
226
*
227
227
* @param handle Socket handle
228
228
* @param address The SocketAddress of the remote host
229
- * @return 0 on success, negative error code on failure
229
+ * @return NSAPI_ERROR_OK on success, negative error code on failure
230
230
*/
231
231
virtual nsapi_error_t socket_connect (nsapi_socket_t handle, const SocketAddress &address) = 0;
232
232
@@ -246,7 +246,7 @@ class NetworkStack: public DNS {
246
246
* @param server Socket handle to server to accept from
247
247
* @param handle Destination for a handle to the newly created socket
248
248
* @param address Destination for the remote address or NULL
249
- * @return 0 on success, negative error code on failure
249
+ * @return NSAPI_ERROR_OK on success, negative error code on failure
250
250
*/
251
251
virtual nsapi_error_t socket_accept (nsapi_socket_t server,
252
252
nsapi_socket_t *handle, SocketAddress *address = 0 ) = 0;
@@ -347,7 +347,7 @@ class NetworkStack: public DNS {
347
347
* @param optname Stack-specific option identifier
348
348
* @param optval Option value
349
349
* @param optlen Length of the option value
350
- * @return 0 on success, negative error code on failure
350
+ * @return NSAPI_ERROR_OK on success, negative error code on failure
351
351
*/
352
352
virtual nsapi_error_t setsockopt (nsapi_socket_t handle, int level,
353
353
int optname, const void *optval, unsigned optlen);
@@ -363,7 +363,7 @@ class NetworkStack: public DNS {
363
363
* @param optname Stack-specific option identifier
364
364
* @param optval Destination for option value
365
365
* @param optlen Length of the option value
366
- * @return 0 on success, negative error code on failure
366
+ * @return NSAPI_ERROR_OK on success, negative error code on failure
367
367
*/
368
368
virtual nsapi_error_t getsockopt (nsapi_socket_t handle, int level,
369
369
int optname, void *optval, unsigned *optlen);
@@ -397,7 +397,7 @@ class NetworkStack: public DNS {
397
397
*
398
398
* @param delay Delay in milliseconds
399
399
* @param func Callback to be called
400
- * @return 0 on success, negative error code on failure
400
+ * @return NSAPI_ERROR_OK on success, negative error code on failure
401
401
*/
402
402
virtual nsapi_error_t call_in (int delay, mbed::Callback<void ()> func);
403
403
};
0 commit comments