@@ -56,7 +56,7 @@ class InternetSocket : public Socket {
56
56
}
57
57
#endif // !defined(DOXYGEN_ONLY)
58
58
59
- /* * Close any open connection and deallocate any memory associated
59
+ /* * Close any open connection, and deallocate any memory associated
60
60
* with the socket. Called from destructor if socket is not closed.
61
61
*
62
62
* @return 0 on success, negative error code on failure (@see nsapi_types.h).
@@ -85,7 +85,7 @@ class InternetSocket : public Socket {
85
85
nsapi_error_t bind (uint16_t port);
86
86
87
87
/* * Bind the socket to a specific address and port on which to receive
88
- * data. If the IP address is zeroed only the port is bound.
88
+ * data. If the IP address is zeroed, only the port is bound.
89
89
*
90
90
* @param address Null-terminated local address to bind.
91
91
* @param port Local port to bind.
@@ -96,21 +96,21 @@ class InternetSocket : public Socket {
96
96
/* * Bind the socket to a specific address and port on which to receive
97
97
* data. If the IP address is zeroed, only the port is bound.
98
98
*
99
- * @param address Local SocketAddress to bind which includes the address and port.
99
+ * @param address Local SocketAddress to bind, which includes the address and port.
100
100
* @return 0 on success, negative error code on failure (@see nsapi_types.h).
101
101
*/
102
102
virtual nsapi_error_t bind (const SocketAddress &address);
103
103
104
- /* * Set blocking or non-blocking mode of the socket.
104
+ /* * Set blocking or nonblocking mode of the socket.
105
105
*
106
- * Initially all sockets are in blocking mode. In non-blocking mode
107
- * blocking operations such as send/recv/accept return
108
- * NSAPI_ERROR_WOULD_BLOCK if they can not continue.
106
+ * Initially all sockets are in blocking mode. In nonblocking mode,
107
+ * blocking operations, such as send/recv/accept, return
108
+ * NSAPI_ERROR_WOULD_BLOCK if they cannot continue.
109
109
*
110
110
* @note set_blocking(false) is equivalent to set_timeout(-1) and
111
111
* set_blocking(true) is equivalent to set_timeout(0).
112
112
*
113
- * @param blocking Use true for blocking mode, false for non-blocking mode.
113
+ * @param blocking Use true for blocking mode, false for nonblocking mode.
114
114
*/
115
115
virtual void set_blocking (bool blocking);
116
116
@@ -131,7 +131,7 @@ class InternetSocket : public Socket {
131
131
/* * Pass stack-specific options to the underlying stack using stack-specific
132
132
* level and option names, or request generic options using levels from nsapi_socket_level_t.
133
133
*
134
- * For unsupported options, NSAPI_ERROR_UNSUPPORTED is returned
134
+ * For unsupported options, NSAPI_ERROR_UNSUPPORTED is returned,
135
135
* and the socket is unmodified.
136
136
*
137
137
* @param level Stack-specific protocol level or nsapi_socket_level_t.
@@ -146,7 +146,7 @@ class InternetSocket : public Socket {
146
146
* stack-specific level and option names, or request generic options
147
147
* using levels from nsapi_socket_level_t.
148
148
*
149
- * For unsupported options, NSAPI_ERROR_UNSUPPORTED is returned
149
+ * For unsupported options, NSAPI_ERROR_UNSUPPORTED is returned,
150
150
* and the socket is unmodified.
151
151
*
152
152
* @param level Stack-specific protocol level or nsapi_socket_level_t.
@@ -159,12 +159,12 @@ class InternetSocket : public Socket {
159
159
160
160
/* * Register a callback on state change of the socket.
161
161
*
162
- * The specified callback will be called on state changes such as when
162
+ * The specified callback is called on state changes, such as when
163
163
* the socket can recv/send/accept successfully and when an error
164
164
* occurs. The callback may also be called spuriously without a reason.
165
165
*
166
166
* The callback may be called in an interrupt context and should not
167
- * perform expensive operations such as recv/send calls.
167
+ * perform expensive operations, such as recv/send calls.
168
168
*
169
169
* @note This is not intended as a replacement for a poll or attach-like
170
170
* asynchronous API, but rather as a building block for constructing
@@ -179,12 +179,12 @@ class InternetSocket : public Socket {
179
179
*
180
180
* @see Socket::sigio
181
181
* @deprecated
182
- * The behaviour of Socket::attach differs from other attach functions in
183
- * mbed OS and has been known to cause confusion. Replaced by Socket::sigio.
182
+ * The behavior of Socket::attach differs from other attach functions in
183
+ * Mbed OS and has been known to cause confusion. Replaced by Socket::sigio.
184
184
*/
185
185
MBED_DEPRECATED_SINCE (" mbed-os-5.4" ,
186
- " The behaviour of Socket::attach differs from other attach functions in "
187
- " mbed OS and has been known to cause confusion. Replaced by Socket::sigio." )
186
+ " The behavior of Socket::attach differs from other attach functions in "
187
+ " Mbed OS and has been known to cause confusion. Replaced by Socket::sigio." )
188
188
void attach (mbed::Callback<void ()> func);
189
189
190
190
/* * Register a callback on state change of the socket.
0 commit comments