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

Side by Side Diff: webrtc/base/asyncudpsocket.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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 SocketAddress AsyncUDPSocket::GetLocalAddress() const { 53 SocketAddress AsyncUDPSocket::GetLocalAddress() const {
54 return socket_->GetLocalAddress(); 54 return socket_->GetLocalAddress();
55 } 55 }
56 56
57 SocketAddress AsyncUDPSocket::GetRemoteAddress() const { 57 SocketAddress AsyncUDPSocket::GetRemoteAddress() const {
58 return socket_->GetRemoteAddress(); 58 return socket_->GetRemoteAddress();
59 } 59 }
60 60
61 int AsyncUDPSocket::Send(const void *pv, size_t cb, 61 int AsyncUDPSocket::Send(const void *pv, size_t cb,
62 const rtc::PacketOptions& options) { 62 const rtc::PacketOptions& options) {
63 return socket_->Send(pv, cb); 63 rtc::SentPacket sent_packet(options.packet_id, rtc::Time());
64 int ret = socket_->Send(pv, cb);
65 SignalSentPacket(this, sent_packet);
66 return ret;
64 } 67 }
65 68
66 int AsyncUDPSocket::SendTo(const void *pv, size_t cb, 69 int AsyncUDPSocket::SendTo(const void *pv, size_t cb,
67 const SocketAddress& addr, 70 const SocketAddress& addr,
68 const rtc::PacketOptions& options) { 71 const rtc::PacketOptions& options) {
69 return socket_->SendTo(pv, cb, addr); 72 rtc::SentPacket sent_packet(options.packet_id, rtc::Time());
73 int ret = socket_->SendTo(pv, cb, addr);
74 SignalSentPacket(this, sent_packet);
75 return ret;
70 } 76 }
71 77
72 int AsyncUDPSocket::Close() { 78 int AsyncUDPSocket::Close() {
73 return socket_->Close(); 79 return socket_->Close();
74 } 80 }
75 81
76 AsyncUDPSocket::State AsyncUDPSocket::GetState() const { 82 AsyncUDPSocket::State AsyncUDPSocket::GetState() const {
77 return STATE_BOUND; 83 return STATE_BOUND;
78 } 84 }
79 85
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // If we did not, then we should resize our buffer to be large enough. 119 // If we did not, then we should resize our buffer to be large enough.
114 SignalReadPacket(this, buf_, static_cast<size_t>(len), remote_addr, 120 SignalReadPacket(this, buf_, static_cast<size_t>(len), remote_addr,
115 CreatePacketTime(0)); 121 CreatePacketTime(0));
116 } 122 }
117 123
118 void AsyncUDPSocket::OnWriteEvent(AsyncSocket* socket) { 124 void AsyncUDPSocket::OnWriteEvent(AsyncSocket* socket) {
119 SignalReadyToSend(this); 125 SignalReadyToSend(this);
120 } 126 }
121 127
122 } // namespace rtc 128 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/asynctcpsocket.cc ('k') | webrtc/base/base_tests.gyp » ('j') | webrtc/call.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698