Skip to content

Commit

Permalink
Merge pull request #12685 from kivaisan/remove_deprecated_netsocket_m…
Browse files Browse the repository at this point in the history
…ethods

Remove deprecated netsocket methods
  • Loading branch information
0xc0170 committed Mar 25, 2020
2 parents fff2342 + 619a5a7 commit b62fdae
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 68 deletions.
5 changes: 0 additions & 5 deletions features/netsocket/InternetSocket.cpp
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
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
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
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

0 comments on commit b62fdae

Please sign in to comment.