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

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

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… 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
« no previous file with comments | « webrtc/p2p/base/relayport.cc ('k') | webrtc/p2p/base/relayserver.cc » ('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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 rtc::SocketAddressPair addr_pair_; 174 rtc::SocketAddressPair addr_pair_;
175 rtc::AsyncPacketSocket* socket_; 175 rtc::AsyncPacketSocket* socket_;
176 bool locked_; 176 bool locked_;
177 rtc::SocketAddress default_dest_; 177 rtc::SocketAddress default_dest_;
178 }; 178 };
179 179
180 // Records a set of internal and external connections that we relay between, 180 // Records a set of internal and external connections that we relay between,
181 // or in other words, that are "bound" together. 181 // or in other words, that are "bound" together.
182 class RelayServerBinding : public rtc::MessageHandler { 182 class RelayServerBinding : public rtc::MessageHandler {
183 public: 183 public:
184 RelayServerBinding( 184 RelayServerBinding(RelayServer* server,
185 RelayServer* server, const std::string& username, 185 const std::string& username,
186 const std::string& password, uint32 lifetime); 186 const std::string& password,
187 uint32_t lifetime);
187 virtual ~RelayServerBinding(); 188 virtual ~RelayServerBinding();
188 189
189 RelayServer* server() { return server_; } 190 RelayServer* server() { return server_; }
190 uint32 lifetime() { return lifetime_; } 191 uint32_t lifetime() { return lifetime_; }
191 const std::string& username() { return username_; } 192 const std::string& username() { return username_; }
192 const std::string& password() { return password_; } 193 const std::string& password() { return password_; }
193 const std::string& magic_cookie() { return magic_cookie_; } 194 const std::string& magic_cookie() { return magic_cookie_; }
194 195
195 // Adds/Removes a connection into the binding. 196 // Adds/Removes a connection into the binding.
196 void AddInternalConnection(RelayServerConnection* conn); 197 void AddInternalConnection(RelayServerConnection* conn);
197 void AddExternalConnection(RelayServerConnection* conn); 198 void AddExternalConnection(RelayServerConnection* conn);
198 199
199 // We keep track of the use of each binding. If we detect that it was not 200 // We keep track of the use of each binding. If we detect that it was not
200 // used for longer than the lifetime, then we send a signal. 201 // used for longer than the lifetime, then we send a signal.
(...skipping 17 matching lines...) Expand all
218 private: 219 private:
219 RelayServer* server_; 220 RelayServer* server_;
220 221
221 std::string username_; 222 std::string username_;
222 std::string password_; 223 std::string password_;
223 std::string magic_cookie_; 224 std::string magic_cookie_;
224 225
225 std::vector<RelayServerConnection*> internal_connections_; 226 std::vector<RelayServerConnection*> internal_connections_;
226 std::vector<RelayServerConnection*> external_connections_; 227 std::vector<RelayServerConnection*> external_connections_;
227 228
228 uint32 lifetime_; 229 uint32_t lifetime_;
229 uint32 last_used_; 230 uint32_t last_used_;
230 // TODO: bandwidth 231 // TODO: bandwidth
231 }; 232 };
232 233
233 } // namespace cricket 234 } // namespace cricket
234 235
235 #endif // WEBRTC_P2P_BASE_RELAYSERVER_H_ 236 #endif // WEBRTC_P2P_BASE_RELAYSERVER_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/relayport.cc ('k') | webrtc/p2p/base/relayserver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698