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:
committed by
WebRTC LUCI CQ
parent
45b3e530cb
commit
d0b8879770
@ -13,11 +13,11 @@
|
||||
#include <utility>
|
||||
|
||||
#include "absl/memory/memory.h"
|
||||
#include "rtc_base/async_socket.h"
|
||||
#include "rtc_base/async_tcp_socket.h"
|
||||
#include "rtc_base/async_udp_socket.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/net_helpers.h"
|
||||
#include "rtc_base/socket.h"
|
||||
#include "rtc_base/socket_server.h"
|
||||
#include "rtc_base/test_echo_server.h"
|
||||
#include "rtc_base/thread.h"
|
||||
@ -40,8 +40,8 @@ namespace {
|
||||
|
||||
void TestUdpInternal(const SocketAddress& loopback) {
|
||||
Thread* main = Thread::Current();
|
||||
AsyncSocket* socket =
|
||||
main->socketserver()->CreateAsyncSocket(loopback.family(), SOCK_DGRAM);
|
||||
Socket* socket =
|
||||
main->socketserver()->CreateSocket(loopback.family(), SOCK_DGRAM);
|
||||
socket->Bind(loopback);
|
||||
|
||||
TestClient client(std::make_unique<AsyncUDPSocket>(socket));
|
||||
@ -56,8 +56,8 @@ void TestTcpInternal(const SocketAddress& loopback) {
|
||||
Thread* main = Thread::Current();
|
||||
TestEchoServer server(main, loopback);
|
||||
|
||||
AsyncSocket* socket =
|
||||
main->socketserver()->CreateAsyncSocket(loopback.family(), SOCK_STREAM);
|
||||
Socket* socket =
|
||||
main->socketserver()->CreateSocket(loopback.family(), SOCK_STREAM);
|
||||
std::unique_ptr<AsyncTCPSocket> tcp_socket = absl::WrapUnique(
|
||||
AsyncTCPSocket::Create(socket, loopback, server.address()));
|
||||
ASSERT_TRUE(tcp_socket != nullptr);
|
||||
|
||||
Reference in New Issue
Block a user