Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(751)

Unified Diff: webrtc/base/win32socketserver.cc

Issue 2866183004: Deleted unused method EstimateMTU, and the WinPing class. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/win32socketserver.h ('k') | webrtc/base/winping.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/win32socketserver.cc
diff --git a/webrtc/base/win32socketserver.cc b/webrtc/base/win32socketserver.cc
index 2a63aec0b5aaea062e781a94ec7d1bd3c2378b93..daec986313a81eea3fb60985173716a92e3f4978 100644
--- a/webrtc/base/win32socketserver.cc
+++ b/webrtc/base/win32socketserver.cc
@@ -17,7 +17,6 @@
#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/win32window.h"
-#include "webrtc/base/winping.h"
namespace rtc {
@@ -525,37 +524,6 @@ int Win32Socket::Close() {
return err;
}
-int Win32Socket::EstimateMTU(uint16_t* mtu) {
- SocketAddress addr = GetRemoteAddress();
- if (addr.IsAnyIP()) {
- error_ = ENOTCONN;
- return -1;
- }
-
- WinPing ping;
- if (!ping.IsValid()) {
- error_ = EINVAL; // can't think of a better error ID
- return -1;
- }
-
- for (int level = 0; PACKET_MAXIMUMS[level + 1] > 0; ++level) {
- int32_t size = PACKET_MAXIMUMS[level] - IP_HEADER_SIZE - ICMP_HEADER_SIZE;
- WinPing::PingResult result = ping.Ping(addr.ipaddr(), size,
- ICMP_PING_TIMEOUT_MILLIS, 1, false);
- if (result == WinPing::PING_FAIL) {
- error_ = EINVAL; // can't think of a better error ID
- return -1;
- }
- if (result != WinPing::PING_TOO_LARGE) {
- *mtu = PACKET_MAXIMUMS[level];
- return 0;
- }
- }
-
- RTC_NOTREACHED();
- return 0;
-}
-
void Win32Socket::CreateSink() {
RTC_DCHECK(nullptr == sink_);
« no previous file with comments | « webrtc/base/win32socketserver.h ('k') | webrtc/base/winping.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698