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

Unified Diff: webrtc/p2p/base/udptransport.cc

Issue 2377883003: First step in providing a UdpTransportChannel. (Closed)
Patch Set: Use only one socket inside UdpTransportChannel. Created 4 years, 2 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
Index: webrtc/p2p/base/udptransport.cc
diff --git a/webrtc/p2p/base/p2ptransport.cc b/webrtc/p2p/base/udptransport.cc
similarity index 60%
copy from webrtc/p2p/base/p2ptransport.cc
copy to webrtc/p2p/base/udptransport.cc
index 1ad2a6faa3fa9486c06be5d5441f83bab957fdf3..8447348c9b3249a8357ab4404305a00c1f158188 100644
--- a/webrtc/p2p/base/p2ptransport.cc
+++ b/webrtc/p2p/base/udptransport.cc
@@ -1,5 +1,5 @@
/*
- * Copyright 2004 The WebRTC Project Authors. All rights reserved.
+ * Copyright 2016 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/p2p/base/p2ptransport.h"
+#include "webrtc/p2p/base/udptransport.h"
#include <string>
@@ -16,22 +16,22 @@
#include "webrtc/base/common.h"
#include "webrtc/base/stringencode.h"
#include "webrtc/base/stringutils.h"
-#include "webrtc/p2p/base/p2ptransportchannel.h"
+#include "webrtc/p2p/base/udptransportchannel.h"
namespace cricket {
-P2PTransport::P2PTransport(const std::string& name, PortAllocator* allocator)
+UdpTransport::UdpTransport(const std::string& name, PortAllocator* allocator)
: Transport(name, allocator) {}
-P2PTransport::~P2PTransport() {
+UdpTransport::~UdpTransport() {
DestroyAllChannels();
}
-TransportChannelImpl* P2PTransport::CreateTransportChannel(int component) {
- return new P2PTransportChannel(name(), component, port_allocator());
+TransportChannelImpl* UdpTransport::CreateTransportChannel(int component) {
+ return new UdpTransportChannel(name(), component);
}
-void P2PTransport::DestroyTransportChannel(TransportChannelImpl* channel) {
+void UdpTransport::DestroyTransportChannel(TransportChannelImpl* channel) {
delete channel;
}

Powered by Google App Engine
This is Rietveld 408576698