mirror of https://github.com/ARMmbed/mbed-os.git
parent
3929f5630b
commit
4f2645b3fc
|
@ -153,36 +153,12 @@ public:
|
||||||
*/
|
*/
|
||||||
using NetworkInterface::add_dns_server;
|
using NetworkInterface::add_dns_server;
|
||||||
|
|
||||||
/** Set socket options
|
/** @copydoc NetworkStack::setsockopt
|
||||||
*
|
|
||||||
* The setsockopt allow an application to pass stack-specific hints
|
|
||||||
* to the underlying stack. For unsupported options,
|
|
||||||
* NSAPI_ERROR_UNSUPPORTED is returned and the socket is unmodified.
|
|
||||||
*
|
|
||||||
* @param handle Socket handle
|
|
||||||
* @param level Stack-specific protocol level
|
|
||||||
* @param optname Stack-specific option identifier
|
|
||||||
* @param optval Option value
|
|
||||||
* @param optlen Length of the option value
|
|
||||||
* @return 0 on success, negative error code on failure
|
|
||||||
*/
|
*/
|
||||||
virtual nsapi_error_t setsockopt(nsapi_socket_t handle, int level,
|
virtual nsapi_error_t setsockopt(nsapi_socket_t handle, int level,
|
||||||
int optname, const void *optval, unsigned optlen);
|
int optname, const void *optval, unsigned optlen);
|
||||||
|
|
||||||
/** Get socket options
|
/** @copydoc NetworkStack::getsockopt
|
||||||
*
|
|
||||||
* getsockopt allows an application to retrieve stack-specific options
|
|
||||||
* from the underlying stack using stack-specific level and option names,
|
|
||||||
* or to request generic options using levels from nsapi_socket_level_t.
|
|
||||||
*
|
|
||||||
* For unsupported options, NSAPI_ERROR_UNSUPPORTED is returned
|
|
||||||
* and the socket is unmodified.
|
|
||||||
*
|
|
||||||
* @param level Stack-specific protocol level or nsapi_socket_level_t
|
|
||||||
* @param optname Level-specific option name
|
|
||||||
* @param optval Destination for option value
|
|
||||||
* @param optlen Length of the option value
|
|
||||||
* @return 0 on success, negative error code on failure
|
|
||||||
*/
|
*/
|
||||||
virtual nsapi_error_t getsockopt(nsapi_socket_t handle, int level, int optname,
|
virtual nsapi_error_t getsockopt(nsapi_socket_t handle, int level, int optname,
|
||||||
void *optval, unsigned *optlen);
|
void *optval, unsigned *optlen);
|
||||||
|
|
|
@ -336,34 +336,34 @@ protected:
|
||||||
*/
|
*/
|
||||||
virtual void socket_attach(nsapi_socket_t handle, void (*callback)(void *), void *data) = 0;
|
virtual void socket_attach(nsapi_socket_t handle, void (*callback)(void *), void *data) = 0;
|
||||||
|
|
||||||
/** Set stack-specific socket options
|
/** Set stack-specific socket options.
|
||||||
*
|
*
|
||||||
* The setsockopt allow an application to pass stack-specific hints
|
* The setsockopt allow an application to pass stack-specific hints
|
||||||
* to the underlying stack. For unsupported options,
|
* to the underlying stack. For unsupported options,
|
||||||
* NSAPI_ERROR_UNSUPPORTED is returned and the socket is unmodified.
|
* NSAPI_ERROR_UNSUPPORTED is returned and the socket is unmodified.
|
||||||
*
|
*
|
||||||
* @param handle Socket handle
|
* @param handle Socket handle.
|
||||||
* @param level Stack-specific protocol level
|
* @param level Stack-specific protocol level.
|
||||||
* @param optname Stack-specific option identifier
|
* @param optname Stack-specific option identifier.
|
||||||
* @param optval Option value
|
* @param optval Option value.
|
||||||
* @param optlen Length of the option value
|
* @param optlen Length of the option value.
|
||||||
* @return NSAPI_ERROR_OK on success, negative error code on failure
|
* @return NSAPI_ERROR_OK on success, negative error code on failure.
|
||||||
*/
|
*/
|
||||||
virtual nsapi_error_t setsockopt(nsapi_socket_t handle, int level,
|
virtual nsapi_error_t setsockopt(nsapi_socket_t handle, int level,
|
||||||
int optname, const void *optval, unsigned optlen);
|
int optname, const void *optval, unsigned optlen);
|
||||||
|
|
||||||
/** Get stack-specific socket options
|
/** Get stack-specific socket options.
|
||||||
*
|
*
|
||||||
* The getstackopt allow an application to retrieve stack-specific hints
|
* The getstackopt allow an application to retrieve stack-specific hints
|
||||||
* from the underlying stack. For unsupported options,
|
* from the underlying stack. For unsupported options,
|
||||||
* NSAPI_ERROR_UNSUPPORTED is returned and optval is unmodified.
|
* NSAPI_ERROR_UNSUPPORTED is returned and optval is unmodified.
|
||||||
*
|
*
|
||||||
* @param handle Socket handle
|
* @param handle Socket handle.
|
||||||
* @param level Stack-specific protocol level
|
* @param level Stack-specific protocol level.
|
||||||
* @param optname Stack-specific option identifier
|
* @param optname Stack-specific option identifier.
|
||||||
* @param optval Destination for option value
|
* @param optval Destination for option value.
|
||||||
* @param optlen Length of the option value
|
* @param optlen Length of the option value.
|
||||||
* @return NSAPI_ERROR_OK on success, negative error code on failure
|
* @return NSAPI_ERROR_OK on success, negative error code on failure.
|
||||||
*/
|
*/
|
||||||
virtual nsapi_error_t getsockopt(nsapi_socket_t handle, int level,
|
virtual nsapi_error_t getsockopt(nsapi_socket_t handle, int level,
|
||||||
int optname, void *optval, unsigned *optlen);
|
int optname, void *optval, unsigned *optlen);
|
||||||
|
|
Loading…
Reference in New Issue