2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
12 #include "webrtc/p2p/base/transportchannel.h"
16 std::string TransportChannel::ToString() const {
17 const char READABLE_ABBREV[2] = { '_', 'R' };
18 const char WRITABLE_ABBREV[2] = { '_', 'W' };
20 ss << "Channel[" << content_name_
22 << "|" << READABLE_ABBREV[readable_] << WRITABLE_ABBREV[writable_] << "]";
26 void TransportChannel::set_readable(bool readable) {
27 if (readable_ != readable) {
29 SignalReadableState(this);
33 void TransportChannel::set_writable(bool writable) {
34 if (writable_ != writable) {
37 SignalReadyToSend(this);
39 SignalWritableState(this);
43 } // namespace cricket