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

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

Issue 1516613002: Only try to pair protocol matching candidates for creating connections. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: merge Created 5 years 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
« no previous file with comments | « webrtc/p2p/base/portinterface.h ('k') | webrtc/p2p/base/stunport.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 53
54 const std::vector<OptionValue>& options() const { return options_; } 54 const std::vector<OptionValue>& options() const { return options_; }
55 bool HasMagicCookie(const char* data, size_t size); 55 bool HasMagicCookie(const char* data, size_t size);
56 56
57 virtual void PrepareAddress(); 57 virtual void PrepareAddress();
58 virtual Connection* CreateConnection(const Candidate& address, 58 virtual Connection* CreateConnection(const Candidate& address,
59 CandidateOrigin origin); 59 CandidateOrigin origin);
60 virtual int SetOption(rtc::Socket::Option opt, int value); 60 virtual int SetOption(rtc::Socket::Option opt, int value);
61 virtual int GetOption(rtc::Socket::Option opt, int* value); 61 virtual int GetOption(rtc::Socket::Option opt, int* value);
62 virtual int GetError(); 62 virtual int GetError();
63 virtual bool SupportsProtocol(const std::string& protocol) const {
64 // Relay port may create both TCP and UDP connections.
65 return true;
66 }
63 67
64 const ProtocolAddress * ServerAddress(size_t index) const; 68 const ProtocolAddress * ServerAddress(size_t index) const;
65 bool IsReady() { return ready_; } 69 bool IsReady() { return ready_; }
66 70
67 // Used for testing. 71 // Used for testing.
68 sigslot::signal1<const ProtocolAddress*> SignalConnectFailure; 72 sigslot::signal1<const ProtocolAddress*> SignalConnectFailure;
69 sigslot::signal1<const ProtocolAddress*> SignalSoftTimeout; 73 sigslot::signal1<const ProtocolAddress*> SignalSoftTimeout;
70 74
71 protected: 75 protected:
72 RelayPort(rtc::Thread* thread, 76 RelayPort(rtc::Thread* thread,
(...skipping 26 matching lines...) Expand all
99 std::vector<ProtocolAddress> external_addr_; 103 std::vector<ProtocolAddress> external_addr_;
100 bool ready_; 104 bool ready_;
101 std::vector<RelayEntry*> entries_; 105 std::vector<RelayEntry*> entries_;
102 std::vector<OptionValue> options_; 106 std::vector<OptionValue> options_;
103 int error_; 107 int error_;
104 }; 108 };
105 109
106 } // namespace cricket 110 } // namespace cricket
107 111
108 #endif // WEBRTC_P2P_BASE_RELAYPORT_H_ 112 #endif // WEBRTC_P2P_BASE_RELAYPORT_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/portinterface.h ('k') | webrtc/p2p/base/stunport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698