mirror of https://github.com/ARMmbed/mbed-os.git
Netsocket: Remove deprecated InternetSocket::attach methods
InternetSocket::sigio should be used instead.pull/12685/head
parent
5d64e55880
commit
2cfee7be71
|
|
@ -205,11 +205,6 @@ void InternetSocket::sigio(Callback<void()> callback)
|
|||
core_util_critical_section_exit();
|
||||
}
|
||||
|
||||
void InternetSocket::attach(Callback<void()> callback)
|
||||
{
|
||||
sigio(callback);
|
||||
}
|
||||
|
||||
nsapi_error_t InternetSocket::getpeername(SocketAddress *address)
|
||||
{
|
||||
if (!_socket) {
|
||||
|
|
|
|||
|
|
@ -124,33 +124,6 @@ public:
|
|||
*/
|
||||
nsapi_error_t getpeername(SocketAddress *address) override;
|
||||
|
||||
/** Register a callback on state change of the socket.
|
||||
*
|
||||
* @see Socket::sigio
|
||||
* @deprecated
|
||||
* The behavior of Socket::attach differs from other attach functions in
|
||||
* Mbed OS and has been known to cause confusion. Replaced by Socket::sigio.
|
||||
*/
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
||||
"The behavior of Socket::attach differs from other attach functions in "
|
||||
"Mbed OS and has been known to cause confusion. Replaced by Socket::sigio.")
|
||||
void attach(mbed::Callback<void()> func);
|
||||
|
||||
/** Register a callback on state change of the socket.
|
||||
*
|
||||
* @see Socket::sigio
|
||||
* @deprecated
|
||||
* The attach function does not support cv-qualifiers. Replaced by
|
||||
* attach(callback(obj, method)).
|
||||
*/
|
||||
template <typename T, typename M>
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.1",
|
||||
"The attach function does not support cv-qualifiers. Replaced by "
|
||||
"attach(callback(obj, method)).")
|
||||
void attach(T *obj, M method)
|
||||
{
|
||||
attach(mbed::callback(obj, method));
|
||||
}
|
||||
|
||||
#if !defined(DOXYGEN_ONLY)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue