Skip to content

Remove deprecated netsocket methods #12685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions features/netsocket/InternetSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
27 changes: 0 additions & 27 deletions features/netsocket/InternetSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,33 +124,6 @@ class InternetSocket : public Socket {
*/
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)

Expand Down
19 changes: 0 additions & 19 deletions features/netsocket/TCPSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,6 @@ class TCPSocket : public InternetSocket {
*/
TCPSocket();

/** Create a socket on a network interface
*
* Creates and opens a socket on the network stack of the given
* network interface.
*
* @param stack Network stack as target for socket
*
* @deprecated since mbed-os-5.11
*/
template <typename S>
MBED_DEPRECATED_SINCE("mbed-os-5.11",
"The TCPSocket(S *stack) constructor is deprecated."
"It discards the open() call return value."
"Use another constructor and call open() explicitly, instead.")
TCPSocket(S *stack) : TCPSocket()
{
open(stack);
}

/** Override multicast functions to return error for TCP
*
*/
Expand Down
17 changes: 0 additions & 17 deletions features/netsocket/UDPSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,6 @@ class UDPSocket : public InternetDatagramSocket {
*/
UDPSocket();

/** Create and open a socket on the network stack of the given
* network interface.
*
* @tparam S Type of the Network stack.
* @param stack Network stack as target for socket.
* @deprecated since mbed-os-5.11
*/
template <typename S>
MBED_DEPRECATED_SINCE("mbed-os-5.11",
"The UDPSocket(S *stack) constructor is deprecated"
"It discards the open() call return value."
"Use another constructor and call open() explicitly, instead.")
UDPSocket(S *stack) : UDPSocket()
{
open(stack);
}

#if !defined(DOXYGEN_ONLY)

protected:
Expand Down