mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Remove unused AsyncPacketSocket::NotifyPacketReceived
Bug: webrtc:15368 Change-Id: Icb1d566670442604172fa1c03fc77e75ab9fde1f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340144 Commit-Queue: Per Kjellander <perkj@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41789}
This commit is contained in:
parent
26794681fd
commit
2fafcec0c5
3 changed files with 4 additions and 15 deletions
|
@ -1385,6 +1385,7 @@ if (rtc_include_tests) {
|
|||
deps = [
|
||||
":async_packet_socket",
|
||||
":gunit_helpers",
|
||||
":socket_address",
|
||||
"../test:test_support",
|
||||
"network:received_packet",
|
||||
"third_party/sigslot",
|
||||
|
|
|
@ -151,16 +151,6 @@ class RTC_EXPORT AsyncPacketSocket : public sigslot::has_slots<> {
|
|||
on_close_.Send(this, err);
|
||||
}
|
||||
|
||||
// TODO(bugs.webrtc.org:15368): Deprecate and remove.
|
||||
void NotifyPacketReceived(AsyncPacketSocket*,
|
||||
const char* data,
|
||||
size_t size,
|
||||
const SocketAddress& address,
|
||||
const int64_t& packet_time_us) {
|
||||
NotifyPacketReceived(
|
||||
ReceivedPacket::CreateFromLegacy(data, size, packet_time_us, address));
|
||||
}
|
||||
|
||||
void NotifyPacketReceived(const rtc::ReceivedPacket& packet);
|
||||
|
||||
RTC_NO_UNIQUE_ADDRESS webrtc::SequenceChecker network_checker_{
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "rtc_base/async_packet_socket.h"
|
||||
|
||||
#include "rtc_base/socket_address.h"
|
||||
#include "rtc_base/third_party/sigslot/sigslot.h"
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
|
@ -47,10 +48,7 @@ class MockAsyncPacketSocket : public rtc::AsyncPacketSocket {
|
|||
MOCK_METHOD(int, GetError, (), (const, override));
|
||||
MOCK_METHOD(void, SetError, (int error), (override));
|
||||
|
||||
void NotifyPacketReceived() {
|
||||
char data[1] = {'a'};
|
||||
AsyncPacketSocket::NotifyPacketReceived(this, data, 1, SocketAddress(), -1);
|
||||
}
|
||||
using AsyncPacketSocket::NotifyPacketReceived;
|
||||
};
|
||||
|
||||
TEST(AsyncPacketSocket, RegisteredCallbackReceivePacketsFromNotify) {
|
||||
|
@ -60,7 +58,7 @@ TEST(AsyncPacketSocket, RegisteredCallbackReceivePacketsFromNotify) {
|
|||
|
||||
EXPECT_CALL(received_packet, Call);
|
||||
mock_socket.RegisterReceivedPacketCallback(received_packet.AsStdFunction());
|
||||
mock_socket.NotifyPacketReceived();
|
||||
mock_socket.NotifyPacketReceived(ReceivedPacket({}, SocketAddress()));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
Loading…
Reference in a new issue