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

Unified Diff: webrtc/p2p/base/port.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/modules/rtp_rtcp/source/h264_sps_parser.cc ('k') | webrtc/p2p/base/port_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/port.cc
diff --git a/webrtc/p2p/base/port.cc b/webrtc/p2p/base/port.cc
index 9207c9d04260433736e51b409f54ab6059c682ed..0759ab3640ab598b018f7512031dc0ea41c31ccc 100644
--- a/webrtc/p2p/base/port.cc
+++ b/webrtc/p2p/base/port.cc
@@ -351,7 +351,7 @@ bool Port::GetStunMessage(const char* data,
// Parse the request message. If the packet is not a complete and correct
// STUN message, then ignore it.
rtc::scoped_ptr<IceMessage> stun_msg(new IceMessage());
- rtc::ByteBuffer buf(data, size);
+ rtc::ByteBufferReader buf(data, size);
if (!stun_msg->Read(&buf) || (buf.Length() > 0)) {
return false;
}
@@ -573,7 +573,7 @@ void Port::SendBindingResponse(StunMessage* request,
response.AddFingerprint();
// Send the response message.
- rtc::ByteBuffer buf;
+ rtc::ByteBufferWriter buf;
response.Write(&buf);
rtc::PacketOptions options(DefaultDscpValue());
auto err = SendTo(buf.Data(), buf.Length(), addr, options, false);
@@ -621,7 +621,7 @@ void Port::SendBindingErrorResponse(StunMessage* request,
response.AddFingerprint();
// Send the response message.
- rtc::ByteBuffer buf;
+ rtc::ByteBufferWriter buf;
response.Write(&buf);
rtc::PacketOptions options(DefaultDscpValue());
SendTo(buf.Data(), buf.Length(), addr, options, false);
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/h264_sps_parser.cc ('k') | webrtc/p2p/base/port_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698