Index: webrtc/p2p/base/port.h |
diff --git a/webrtc/p2p/base/port.h b/webrtc/p2p/base/port.h |
index c6b7f609aad7500e6ad7d0b68676e2a59c072d5a..dc548763de188001ff54fbfa2c56d8e68ccff068 100644 |
--- a/webrtc/p2p/base/port.h |
+++ b/webrtc/p2p/base/port.h |
@@ -52,19 +52,19 @@ extern const char TCPTYPE_SIMOPEN_STR[]; |
// The minimum time we will wait before destroying a connection after creating |
// it. |
-const uint32 MIN_CONNECTION_LIFETIME = 10 * 1000; // 10 seconds. |
+const uint32_t MIN_CONNECTION_LIFETIME = 10 * 1000; // 10 seconds. |
// The timeout duration when a connection does not receive anything. |
-const uint32 WEAK_CONNECTION_RECEIVE_TIMEOUT = 2500; // 2.5 seconds |
+const uint32_t WEAK_CONNECTION_RECEIVE_TIMEOUT = 2500; // 2.5 seconds |
// The length of time we wait before timing out writability on a connection. |
-const uint32 CONNECTION_WRITE_TIMEOUT = 15 * 1000; // 15 seconds |
+const uint32_t CONNECTION_WRITE_TIMEOUT = 15 * 1000; // 15 seconds |
// The length of time we wait before we become unwritable. |
-const uint32 CONNECTION_WRITE_CONNECT_TIMEOUT = 5 * 1000; // 5 seconds |
+const uint32_t CONNECTION_WRITE_CONNECT_TIMEOUT = 5 * 1000; // 5 seconds |
// The number of pings that must fail to respond before we become unwritable. |
-const uint32 CONNECTION_WRITE_CONNECT_FAILURES = 5; |
+const uint32_t CONNECTION_WRITE_CONNECT_FAILURES = 5; |
// This is the length of time that we wait for a ping response to come back. |
const int CONNECTION_RESPONSE_TIMEOUT = 5 * 1000; // 5 seconds |
@@ -122,8 +122,8 @@ class Port : public PortInterface, public rtc::MessageHandler, |
rtc::PacketSocketFactory* factory, |
rtc::Network* network, |
const rtc::IPAddress& ip, |
- uint16 min_port, |
- uint16 max_port, |
+ uint16_t min_port, |
+ uint16_t max_port, |
const std::string& username_fragment, |
const std::string& password); |
virtual ~Port(); |
@@ -135,8 +135,8 @@ class Port : public PortInterface, public rtc::MessageHandler, |
IceRole GetIceRole() const { return ice_role_; } |
void SetIceRole(IceRole role) { ice_role_ = role; } |
- void SetIceTiebreaker(uint64 tiebreaker) { tiebreaker_ = tiebreaker; } |
- uint64 IceTiebreaker() const { return tiebreaker_; } |
+ void SetIceTiebreaker(uint64_t tiebreaker) { tiebreaker_ = tiebreaker; } |
+ uint64_t IceTiebreaker() const { return tiebreaker_; } |
virtual bool SharedSocket() const { return shared_socket_; } |
void ResetSharedSocket() { shared_socket_ = false; } |
@@ -167,8 +167,8 @@ class Port : public PortInterface, public rtc::MessageHandler, |
} |
// Identifies the generation that this port was created in. |
- uint32 generation() { return generation_; } |
- void set_generation(uint32 generation) { generation_ = generation; } |
+ uint32_t generation() { return generation_; } |
+ void set_generation(uint32_t generation) { generation_ = generation; } |
// ICE requires a single username/password per content/media line. So the |
// |ice_username_fragment_| of the ports that belongs to the same content will |
@@ -257,8 +257,8 @@ class Port : public PortInterface, public rtc::MessageHandler, |
// Debugging description of this port |
virtual std::string ToString() const; |
const rtc::IPAddress& ip() const { return ip_; } |
- uint16 min_port() { return min_port_; } |
- uint16 max_port() { return max_port_; } |
+ uint16_t min_port() { return min_port_; } |
+ uint16_t max_port() { return max_port_; } |
// Timeout shortening function to speed up unit tests. |
void set_timeout_delay(int delay) { timeout_delay_ = delay; } |
@@ -282,7 +282,7 @@ class Port : public PortInterface, public rtc::MessageHandler, |
// Returns the index of the new local candidate. |
size_t AddPrflxCandidate(const Candidate& local); |
- void set_candidate_filter(uint32 candidate_filter) { |
+ void set_candidate_filter(uint32_t candidate_filter) { |
candidate_filter_ = candidate_filter; |
} |
@@ -301,8 +301,8 @@ class Port : public PortInterface, public rtc::MessageHandler, |
const std::string& relay_protocol, |
const std::string& tcptype, |
const std::string& type, |
- uint32 type_preference, |
- uint32 relay_preference, |
+ uint32_t type_preference, |
+ uint32_t relay_preference, |
bool final); |
// Adds the given connection to the list. (Deleting removes them.) |
@@ -333,7 +333,7 @@ class Port : public PortInterface, public rtc::MessageHandler, |
return rtc::DSCP_NO_CHANGE; |
} |
- uint32 candidate_filter() { return candidate_filter_; } |
+ uint32_t candidate_filter() { return candidate_filter_; } |
private: |
void Construct(); |
@@ -352,11 +352,11 @@ class Port : public PortInterface, public rtc::MessageHandler, |
bool send_retransmit_count_attribute_; |
rtc::Network* network_; |
rtc::IPAddress ip_; |
- uint16 min_port_; |
- uint16 max_port_; |
+ uint16_t min_port_; |
+ uint16_t max_port_; |
std::string content_name_; |
int component_; |
- uint32 generation_; |
+ uint32_t generation_; |
// In order to establish a connection to this Port (so that real data can be |
// sent through), the other side must send us a STUN binding request that is |
// authenticated with this username_fragment and password. |
@@ -372,7 +372,7 @@ class Port : public PortInterface, public rtc::MessageHandler, |
int timeout_delay_; |
bool enable_port_packets_; |
IceRole ice_role_; |
- uint64 tiebreaker_; |
+ uint64_t tiebreaker_; |
bool shared_socket_; |
// Information to use when going through a proxy. |
std::string user_agent_; |
@@ -382,7 +382,7 @@ class Port : public PortInterface, public rtc::MessageHandler, |
// make its own decision on how to create candidates. For example, |
// when IceTransportsType is set to relay, both RelayPort and |
// TurnPort will hide raddr to avoid local address leakage. |
- uint32 candidate_filter_; |
+ uint32_t candidate_filter_; |
friend class Connection; |
}; |
@@ -393,12 +393,11 @@ class Connection : public rtc::MessageHandler, |
public sigslot::has_slots<> { |
public: |
struct SentPing { |
- SentPing(const std::string id, uint32 sent_time) |
- : id(id), |
- sent_time(sent_time) {} |
+ SentPing(const std::string id, uint32_t sent_time) |
+ : id(id), sent_time(sent_time) {} |
std::string id; |
- uint32 sent_time; |
+ uint32_t sent_time; |
}; |
// States are from RFC 5245. http://tools.ietf.org/html/rfc5245#section-5.7.4 |
@@ -422,7 +421,7 @@ class Connection : public rtc::MessageHandler, |
const Candidate& remote_candidate() const { return remote_candidate_; } |
// Returns the pair priority. |
- uint64 priority() const; |
+ uint64_t priority() const; |
enum WriteState { |
STATE_WRITABLE = 0, // we have received ping responses recently |
@@ -444,10 +443,10 @@ class Connection : public rtc::MessageHandler, |
return write_state_ != STATE_WRITE_TIMEOUT; |
} |
// A connection is dead if it can be safely deleted. |
- bool dead(uint32 now) const; |
+ bool dead(uint32_t now) const; |
// Estimate of the round-trip time over this connection. |
- uint32 rtt() const { return rtt_; } |
+ uint32_t rtt() const { return rtt_; } |
size_t sent_total_bytes(); |
size_t sent_bytes_second(); |
@@ -501,7 +500,7 @@ class Connection : public rtc::MessageHandler, |
remote_ice_mode_ = mode; |
} |
- void set_receiving_timeout(uint32 receiving_timeout_ms) { |
+ void set_receiving_timeout(uint32_t receiving_timeout_ms) { |
receiving_timeout_ = receiving_timeout_ms; |
} |
@@ -510,16 +509,16 @@ class Connection : public rtc::MessageHandler, |
// Checks that the state of this connection is up-to-date. The argument is |
// the current time, which is compared against various timeouts. |
- void UpdateState(uint32 now); |
+ void UpdateState(uint32_t now); |
// Called when this connection should try checking writability again. |
- uint32 last_ping_sent() const { return last_ping_sent_; } |
- void Ping(uint32 now); |
+ uint32_t last_ping_sent() const { return last_ping_sent_; } |
+ void Ping(uint32_t now); |
void ReceivedPingResponse(); |
// Called whenever a valid ping is received on this connection. This is |
// public because the connection intercepts the first ping for us. |
- uint32 last_ping_received() const { return last_ping_received_; } |
+ uint32_t last_ping_received() const { return last_ping_received_; } |
void ReceivedPing(); |
// Debugging description of this connection |
@@ -555,7 +554,7 @@ class Connection : public rtc::MessageHandler, |
// Returns the last received time of any data, stun request, or stun |
// response in milliseconds |
- uint32 last_received(); |
+ uint32_t last_received(); |
protected: |
enum { MSG_DELETE = 0, MSG_FIRST_AVAILABLE }; |
@@ -599,18 +598,18 @@ class Connection : public rtc::MessageHandler, |
bool nominated_; |
IceMode remote_ice_mode_; |
StunRequestManager requests_; |
- uint32 rtt_; |
- uint32 last_ping_sent_; // last time we sent a ping to the other side |
- uint32 last_ping_received_; // last time we received a ping from the other |
- // side |
- uint32 last_data_received_; |
- uint32 last_ping_response_received_; |
+ uint32_t rtt_; |
+ uint32_t last_ping_sent_; // last time we sent a ping to the other side |
+ uint32_t last_ping_received_; // last time we received a ping from the other |
+ // side |
+ uint32_t last_data_received_; |
+ uint32_t last_ping_response_received_; |
std::vector<SentPing> pings_since_last_response_; |
rtc::RateTracker recv_rate_tracker_; |
rtc::RateTracker send_rate_tracker_; |
- uint32 sent_packets_discarded_; |
- uint32 sent_packets_total_; |
+ uint32_t sent_packets_discarded_; |
+ uint32_t sent_packets_total_; |
private: |
void MaybeAddPrflxCandidate(ConnectionRequest* request, |
@@ -619,8 +618,8 @@ class Connection : public rtc::MessageHandler, |
bool reported_; |
State state_; |
// Time duration to switch from receiving to not receiving. |
- uint32 receiving_timeout_; |
- uint32 time_created_ms_; |
+ uint32_t receiving_timeout_; |
+ uint32_t time_created_ms_; |
friend class Port; |
friend class ConnectionRequest; |