Netsocket: Remove deprecated InternetSocket::attach methods

InternetSocket::sigio should be used instead.
pull/12685/head
Kimmo Vaisanen 2020-03-24 12:31:37 +02:00
parent 5d64e55880
commit 2cfee7be71
2 changed files with 0 additions and 32 deletions

View File

@ -205,11 +205,6 @@ void InternetSocket::sigio(Callback<void()> callback)
core_util_critical_section_exit(); core_util_critical_section_exit();
} }
void InternetSocket::attach(Callback<void()> callback)
{
sigio(callback);
}
nsapi_error_t InternetSocket::getpeername(SocketAddress *address) nsapi_error_t InternetSocket::getpeername(SocketAddress *address)
{ {
if (!_socket) { if (!_socket) {

View File

@ -124,33 +124,6 @@ public:
*/ */
nsapi_error_t getpeername(SocketAddress *address) override; 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) #if !defined(DOXYGEN_ONLY)