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

Side by Side Diff: webrtc/base/asynctcpsocket.cc

Issue 1363573002: Wire up transport sequence number / send time callbacks to webrtc via libjingle. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add missing updated_options Created 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 AppendToOutBuffer(&pkt_len, kPacketLenSize); 261 AppendToOutBuffer(&pkt_len, kPacketLenSize);
262 AppendToOutBuffer(pv, cb); 262 AppendToOutBuffer(pv, cb);
263 263
264 int res = FlushOutBuffer(); 264 int res = FlushOutBuffer();
265 if (res <= 0) { 265 if (res <= 0) {
266 // drop packet if we made no progress 266 // drop packet if we made no progress
267 ClearOutBuffer(); 267 ClearOutBuffer();
268 return res; 268 return res;
269 } 269 }
270 270
271 rtc::SentPacket sent_packet(options.packet_id, rtc::Time());
272 SignalSentPacket(this, sent_packet);
273
271 // We claim to have sent the whole thing, even if we only sent partial 274 // We claim to have sent the whole thing, even if we only sent partial
272 return static_cast<int>(cb); 275 return static_cast<int>(cb);
273 } 276 }
274 277
275 void AsyncTCPSocket::ProcessInput(char * data, size_t* len) { 278 void AsyncTCPSocket::ProcessInput(char * data, size_t* len) {
276 SocketAddress remote_addr(GetRemoteAddress()); 279 SocketAddress remote_addr(GetRemoteAddress());
277 280
278 while (true) { 281 while (true) {
279 if (*len < kPacketLenSize) 282 if (*len < kPacketLenSize)
280 return; 283 return;
(...skipping 10 matching lines...) Expand all
291 memmove(data, data + kPacketLenSize + pkt_len, *len); 294 memmove(data, data + kPacketLenSize + pkt_len, *len);
292 } 295 }
293 } 296 }
294 } 297 }
295 298
296 void AsyncTCPSocket::HandleIncomingConnection(AsyncSocket* socket) { 299 void AsyncTCPSocket::HandleIncomingConnection(AsyncSocket* socket) {
297 SignalNewConnection(this, new AsyncTCPSocket(socket, false)); 300 SignalNewConnection(this, new AsyncTCPSocket(socket, false));
298 } 301 }
299 302
300 } // namespace rtc 303 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/asyncpacketsocket.h ('k') | webrtc/base/asyncudpsocket.cc » ('j') | webrtc/call.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698