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

Side by Side Diff: webrtc/p2p/base/port.h

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: No changes to const parameters. 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 bool ParseStunUsername(const StunMessage* stun_msg, 268 bool ParseStunUsername(const StunMessage* stun_msg,
269 std::string* local_username, 269 std::string* local_username,
270 std::string* remote_username) const; 270 std::string* remote_username) const;
271 void CreateStunUsername(const std::string& remote_username, 271 void CreateStunUsername(const std::string& remote_username,
272 std::string* stun_username_attr_str) const; 272 std::string* stun_username_attr_str) const;
273 273
274 bool MaybeIceRoleConflict(const rtc::SocketAddress& addr, 274 bool MaybeIceRoleConflict(const rtc::SocketAddress& addr,
275 IceMessage* stun_msg, 275 IceMessage* stun_msg,
276 const std::string& remote_ufrag); 276 const std::string& remote_ufrag);
277 277
278 // Called when a packet has been sent to the socket.
279 void OnPacketSent(const rtc::SocketAddress& addr,
280 const rtc::SentPacket& sent_packet);
281
278 // Called when the socket is currently able to send. 282 // Called when the socket is currently able to send.
279 void OnReadyToSend(); 283 void OnReadyToSend();
280 284
281 // Called when the Connection discovers a local peer reflexive candidate. 285 // Called when the Connection discovers a local peer reflexive candidate.
282 // Returns the index of the new local candidate. 286 // Returns the index of the new local candidate.
283 size_t AddPrflxCandidate(const Candidate& local); 287 size_t AddPrflxCandidate(const Candidate& local);
284 288
285 void set_candidate_filter(uint32 candidate_filter) { 289 void set_candidate_filter(uint32 candidate_filter) {
286 candidate_filter_ = candidate_filter; 290 candidate_filter_ = candidate_filter;
287 } 291 }
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 // covers. 472 // covers.
469 virtual int Send(const void* data, size_t size, 473 virtual int Send(const void* data, size_t size,
470 const rtc::PacketOptions& options) = 0; 474 const rtc::PacketOptions& options) = 0;
471 475
472 // Error if Send() returns < 0 476 // Error if Send() returns < 0
473 virtual int GetError() = 0; 477 virtual int GetError() = 0;
474 478
475 sigslot::signal4<Connection*, const char*, size_t, const rtc::PacketTime&> 479 sigslot::signal4<Connection*, const char*, size_t, const rtc::PacketTime&>
476 SignalReadPacket; 480 SignalReadPacket;
477 481
482 sigslot::signal2<Connection*, const rtc::SentPacket&> SignalSentPacket;
483
478 sigslot::signal1<Connection*> SignalReadyToSend; 484 sigslot::signal1<Connection*> SignalReadyToSend;
479 485
480 // Called when a packet is received on this connection. 486 // Called when a packet is received on this connection.
481 void OnReadPacket(const char* data, size_t size, 487 void OnReadPacket(const char* data, size_t size,
482 const rtc::PacketTime& packet_time); 488 const rtc::PacketTime& packet_time);
483 489
490 void OnPacketSent(const rtc::SentPacket& sent_packet);
491
484 // Called when the socket is currently able to send. 492 // Called when the socket is currently able to send.
485 void OnReadyToSend(); 493 void OnReadyToSend();
486 494
487 // Called when a connection is determined to be no longer useful to us. We 495 // Called when a connection is determined to be no longer useful to us. We
488 // still keep it around in case the other side wants to use it. But we can 496 // still keep it around in case the other side wants to use it. But we can
489 // safely stop pinging on it and we can allow it to time out if the other 497 // safely stop pinging on it and we can allow it to time out if the other
490 // side stops using it as well. 498 // side stops using it as well.
491 bool pruned() const { return pruned_; } 499 bool pruned() const { return pruned_; }
492 void Prune(); 500 void Prune();
493 501
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 const rtc::PacketOptions& options); 643 const rtc::PacketOptions& options);
636 virtual int GetError() { return error_; } 644 virtual int GetError() { return error_; }
637 645
638 private: 646 private:
639 int error_; 647 int error_;
640 }; 648 };
641 649
642 } // namespace cricket 650 } // namespace cricket
643 651
644 #endif // WEBRTC_P2P_BASE_PORT_H_ 652 #endif // WEBRTC_P2P_BASE_PORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698