OLD | NEW |
---|---|
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 Loading... | |
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 SignalPacketSent(this, GetRemoteAddress(), sent_packet); | |
pthatcher1
2015/10/05 18:30:14
We have SignalPacketSent, but that doesn't signal
stefan-webrtc
2015/10/06 13:00:19
This is not something I'm trying to achieve right
pthatcher1
2015/10/06 20:23:55
Makes sense.
| |
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 Loading... | |
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 |
OLD | NEW |