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

Unified Diff: webrtc/p2p/base/turnport.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/stunserver_unittest.cc ('k') | webrtc/p2p/base/turnserver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/turnport.cc
diff --git a/webrtc/p2p/base/turnport.cc b/webrtc/p2p/base/turnport.cc
index 5f719ce0ffe4d0a6bb232cd2a55b29a6b8c2c0e1..9ea354c42cf259a7d00bc429930b05054145aa90 100644
--- a/webrtc/p2p/base/turnport.cc
+++ b/webrtc/p2p/base/turnport.cc
@@ -786,7 +786,7 @@ void TurnPort::OnAllocateRequestTimeout() {
void TurnPort::HandleDataIndication(const char* data, size_t size,
const rtc::PacketTime& packet_time) {
// Read in the message, and process according to RFC5766, Section 10.4.
- rtc::ByteBuffer buf(data, size);
+ rtc::ByteBufferReader buf(data, size);
TurnMessage msg;
if (!msg.Read(&buf)) {
LOG_J(LS_WARNING, this) << "Received invalid TURN data indication";
@@ -1425,7 +1425,7 @@ void TurnEntry::SendChannelBindRequest(int delay) {
int TurnEntry::Send(const void* data, size_t size, bool payload,
const rtc::PacketOptions& options) {
- rtc::ByteBuffer buf;
+ rtc::ByteBufferWriter buf;
if (state_ != STATE_BOUND) {
// If we haven't bound the channel yet, we have to use a Send Indication.
TurnMessage msg;
« no previous file with comments | « webrtc/p2p/base/stunserver_unittest.cc ('k') | webrtc/p2p/base/turnserver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698