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}
This commit is contained in:
Niels Möller
2021-08-12 10:32:30 +02:00
committed by WebRTC LUCI CQ
parent 45b3e530cb
commit d0b8879770
73 changed files with 570 additions and 685 deletions

View File

@ -13,8 +13,8 @@
#include <stddef.h>
#include "rtc_base/async_socket.h"
#include "rtc_base/constructor_magic.h"
#include "rtc_base/socket.h"
#include "rtc_base/stream.h"
#include "rtc_base/third_party/sigslot/sigslot.h"
@ -24,13 +24,13 @@ namespace rtc {
class SocketStream : public StreamInterface, public sigslot::has_slots<> {
public:
explicit SocketStream(AsyncSocket* socket);
explicit SocketStream(Socket* socket);
~SocketStream() override;
void Attach(AsyncSocket* socket);
AsyncSocket* Detach();
void Attach(Socket* socket);
Socket* Detach();
AsyncSocket* GetSocket() { return socket_; }
Socket* GetSocket() { return socket_; }
StreamState GetState() const override;
@ -47,12 +47,12 @@ class SocketStream : public StreamInterface, public sigslot::has_slots<> {
void Close() override;
private:
void OnConnectEvent(AsyncSocket* socket);
void OnReadEvent(AsyncSocket* socket);
void OnWriteEvent(AsyncSocket* socket);
void OnCloseEvent(AsyncSocket* socket, int err);
void OnConnectEvent(Socket* socket);
void OnReadEvent(Socket* socket);
void OnWriteEvent(Socket* socket);
void OnCloseEvent(Socket* socket, int err);
AsyncSocket* socket_;
Socket* socket_;
RTC_DISALLOW_COPY_AND_ASSIGN(SocketStream);
};