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

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

Issue 1793553002: Using 64-bit timestamp in webrtc/p2p (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(RelayServer* server, 184 RelayServerBinding(RelayServer* server,
185 const std::string& username, 185 const std::string& username,
186 const std::string& password, 186 const std::string& password,
187 uint32_t lifetime); 187 int lifetime);
188 virtual ~RelayServerBinding(); 188 virtual ~RelayServerBinding();
189 189
190 RelayServer* server() { return server_; } 190 RelayServer* server() { return server_; }
191 uint32_t lifetime() { return lifetime_; } 191 int lifetime() { return lifetime_; }
192 const std::string& username() { return username_; } 192 const std::string& username() { return username_; }
193 const std::string& password() { return password_; } 193 const std::string& password() { return password_; }
194 const std::string& magic_cookie() { return magic_cookie_; } 194 const std::string& magic_cookie() { return magic_cookie_; }
195 195
196 // Adds/Removes a connection into the binding. 196 // Adds/Removes a connection into the binding.
197 void AddInternalConnection(RelayServerConnection* conn); 197 void AddInternalConnection(RelayServerConnection* conn);
198 void AddExternalConnection(RelayServerConnection* conn); 198 void AddExternalConnection(RelayServerConnection* conn);
199 199
200 // 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
201 // 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
219 private: 219 private:
220 RelayServer* server_; 220 RelayServer* server_;
221 221
222 std::string username_; 222 std::string username_;
223 std::string password_; 223 std::string password_;
224 std::string magic_cookie_; 224 std::string magic_cookie_;
225 225
226 std::vector<RelayServerConnection*> internal_connections_; 226 std::vector<RelayServerConnection*> internal_connections_;
227 std::vector<RelayServerConnection*> external_connections_; 227 std::vector<RelayServerConnection*> external_connections_;
228 228
229 uint32_t lifetime_; 229 int lifetime_;
230 uint32_t last_used_; 230 int64_t last_used_;
231 // TODO: bandwidth 231 // TODO: bandwidth
232 }; 232 };
233 233
234 } // namespace cricket 234 } // namespace cricket
235 235
236 #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