| Index: webrtc/p2p/base/transport.h
|
| diff --git a/webrtc/p2p/base/transport.h b/webrtc/p2p/base/transport.h
|
| index b401c260c3884c9147cc71b81b270f3df99dbeb4..508f10bd18aa5a5d95cda168ef9b10665c7a9ed0 100644
|
| --- a/webrtc/p2p/base/transport.h
|
| +++ b/webrtc/p2p/base/transport.h
|
| @@ -65,7 +65,7 @@ enum IceGatheringState {
|
| kIceGatheringComplete,
|
| };
|
|
|
| -// For "writable", "readable", and "receiving", we need to differentiate between
|
| +// For "writable" and "receiving", we need to differentiate between
|
| // none, all, and some.
|
| enum TransportState {
|
| TRANSPORT_STATE_NONE = 0,
|
| @@ -74,10 +74,9 @@ enum TransportState {
|
| };
|
|
|
| // When checking transport state, we need to differentiate between
|
| -// "readable", "writable", or "receiving" check.
|
| +// "writable" or "receiving" check.
|
| enum TransportStateType {
|
| - TRANSPORT_READABLE_STATE = 0,
|
| - TRANSPORT_WRITABLE_STATE,
|
| + TRANSPORT_WRITABLE_STATE = 0,
|
| TRANSPORT_RECEIVING_STATE
|
| };
|
|
|
| @@ -87,7 +86,6 @@ struct ConnectionInfo {
|
| ConnectionInfo()
|
| : best_connection(false),
|
| writable(false),
|
| - readable(false),
|
| timeout(false),
|
| new_connection(false),
|
| rtt(0),
|
| @@ -101,7 +99,7 @@ struct ConnectionInfo {
|
|
|
| bool best_connection; // Is this the best connection we have?
|
| bool writable; // Has this connection received a STUN response?
|
| - bool readable; // Has this connection received a STUN request?
|
| + bool receiving; // Has this connection received anything?
|
| bool timeout; // Has this connection timed out?
|
| bool new_connection; // Is this a newly created connection?
|
| size_t rtt; // The STUN RTT for this connection.
|
| @@ -158,25 +156,16 @@ class Transport : public sigslot::has_slots<> {
|
| // Returns the port allocator object for this transport.
|
| PortAllocator* port_allocator() { return allocator_; }
|
|
|
| - // Returns the readable and states of this manager. These bits are the ORs
|
| + // Returns the states of this manager. These bits are the ORs
|
| // of the corresponding bits on the managed channels. Each time one of these
|
| // states changes, a signal is raised.
|
| - // TODO: Replace uses of readable() and writable() with
|
| - // any_channels_readable() and any_channels_writable().
|
| - bool readable() const { return any_channels_readable(); }
|
| + // TODO(honghaiz): Replace uses of writable() with any_channels_writable().
|
| bool writable() const { return any_channels_writable(); }
|
| bool was_writable() const { return was_writable_; }
|
| - bool any_channels_readable() const {
|
| - return (readable_ == TRANSPORT_STATE_SOME ||
|
| - readable_ == TRANSPORT_STATE_ALL);
|
| - }
|
| bool any_channels_writable() const {
|
| return (writable_ == TRANSPORT_STATE_SOME ||
|
| writable_ == TRANSPORT_STATE_ALL);
|
| }
|
| - bool all_channels_readable() const {
|
| - return (readable_ == TRANSPORT_STATE_ALL);
|
| - }
|
| bool all_channels_writable() const {
|
| return (writable_ == TRANSPORT_STATE_ALL);
|
| }
|
| @@ -193,7 +182,6 @@ class Transport : public sigslot::has_slots<> {
|
|
|
| IceGatheringState gathering_state() const { return gathering_state_; }
|
|
|
| - sigslot::signal1<Transport*> SignalReadableState;
|
| sigslot::signal1<Transport*> SignalWritableState;
|
| sigslot::signal1<Transport*> SignalReceivingState;
|
| sigslot::signal1<Transport*> SignalCompleted;
|
| @@ -359,8 +347,7 @@ class Transport : public sigslot::has_slots<> {
|
| // Candidate component => ChannelMapEntry
|
| typedef std::map<int, ChannelMapEntry> ChannelMap;
|
|
|
| - // Called when the state of a channel changes.
|
| - void OnChannelReadableState(TransportChannel* channel);
|
| + // Called when the write state of a channel changes.
|
| void OnChannelWritableState(TransportChannel* channel);
|
|
|
| // Called when the receiving state of a channel changes.
|
|
|