Delete AsyncSocket class, merge into Socket class
Bug: webrtc:13065
Change-Id: I13afee2386ea9c4de0e4fa95133f0c4d3ec826e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227031
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34787}
diff --git a/rtc_base/async_udp_socket.h b/rtc_base/async_udp_socket.h
index ce7f476..5d738ff 100644
--- a/rtc_base/async_udp_socket.h
+++ b/rtc_base/async_udp_socket.h
@@ -16,7 +16,6 @@
#include <memory>
#include "rtc_base/async_packet_socket.h"
-#include "rtc_base/async_socket.h"
#include "rtc_base/socket.h"
#include "rtc_base/socket_address.h"
#include "rtc_base/socket_factory.h"
@@ -30,13 +29,13 @@
// Binds `socket` and creates AsyncUDPSocket for it. Takes ownership
// of `socket`. Returns null if bind() fails (`socket` is destroyed
// in that case).
- static AsyncUDPSocket* Create(AsyncSocket* socket,
+ static AsyncUDPSocket* Create(Socket* socket,
const SocketAddress& bind_address);
// Creates a new socket for sending asynchronous UDP packets using an
// asynchronous socket from the given factory.
static AsyncUDPSocket* Create(SocketFactory* factory,
const SocketAddress& bind_address);
- explicit AsyncUDPSocket(AsyncSocket* socket);
+ explicit AsyncUDPSocket(Socket* socket);
~AsyncUDPSocket() override;
SocketAddress GetLocalAddress() const override;
@@ -58,11 +57,11 @@
private:
// Called when the underlying socket is ready to be read from.
- void OnReadEvent(AsyncSocket* socket);
+ void OnReadEvent(Socket* socket);
// Called when the underlying socket is ready to send.
- void OnWriteEvent(AsyncSocket* socket);
+ void OnWriteEvent(Socket* socket);
- std::unique_ptr<AsyncSocket> socket_;
+ std::unique_ptr<Socket> socket_;
char* buf_;
size_t size_;
};