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

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

Issue 1821083002: Split ByteBuffer into writer/reader objects. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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/p2p/base/stunrequest.cc ('k') | webrtc/p2p/base/stunserver_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/stunserver.cc
diff --git a/webrtc/p2p/base/stunserver.cc b/webrtc/p2p/base/stunserver.cc
index fbc316bd47d70eb8195706c466736544780fa616..bac9fd596b4f06323937748d6ad3eb8e967b4487 100644
--- a/webrtc/p2p/base/stunserver.cc
+++ b/webrtc/p2p/base/stunserver.cc
@@ -28,7 +28,7 @@ void StunServer::OnPacket(
const rtc::SocketAddress& remote_addr,
const rtc::PacketTime& packet_time) {
// Parse the STUN message; eat any messages that fail to parse.
- rtc::ByteBuffer bbuf(buf, size);
+ rtc::ByteBufferReader bbuf(buf, size);
StunMessage msg;
if (!msg.Read(&bbuf)) {
return;
@@ -72,7 +72,7 @@ void StunServer::SendErrorResponse(
void StunServer::SendResponse(
const StunMessage& msg, const rtc::SocketAddress& addr) {
- rtc::ByteBuffer buf;
+ rtc::ByteBufferWriter buf;
msg.Write(&buf);
rtc::PacketOptions options;
if (socket_->SendTo(buf.Data(), buf.Length(), addr, options) < 0)
« no previous file with comments | « webrtc/p2p/base/stunrequest.cc ('k') | webrtc/p2p/base/stunserver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698