henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 1 | /* |
| 2 | * libjingle |
jlmiller@webrtc.org | 5f93d0a | 2015-01-20 21:36:13 +0000 | [diff] [blame] | 3 | * Copyright 2012 Google Inc. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions are met: |
| 7 | * |
| 8 | * 1. Redistributions of source code must retain the above copyright notice, |
| 9 | * this list of conditions and the following disclaimer. |
| 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
| 11 | * this list of conditions and the following disclaimer in the documentation |
| 12 | * and/or other materials provided with the distribution. |
| 13 | * 3. The name of the author may not be used to endorse or promote products |
| 14 | * derived from this software without specific prior written permission. |
| 15 | * |
| 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
| 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
| 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
| 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
| 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
| 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 | */ |
| 27 | |
| 28 | #ifndef TALK_APP_WEBRTC_DATACHANNEL_H_ |
| 29 | #define TALK_APP_WEBRTC_DATACHANNEL_H_ |
| 30 | |
jiayl@webrtc.org | b43c99d | 2014-06-20 17:11:14 +0000 | [diff] [blame] | 31 | #include <deque> |
deadbeef | ab9b2d1 | 2015-10-14 11:33:11 -0700 | [diff] [blame] | 32 | #include <set> |
buildbot@webrtc.org | a09a999 | 2014-08-13 17:26:08 +0000 | [diff] [blame] | 33 | #include <string> |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 34 | |
| 35 | #include "talk/app/webrtc/datachannelinterface.h" |
| 36 | #include "talk/app/webrtc/proxy.h" |
buildbot@webrtc.org | a09a999 | 2014-08-13 17:26:08 +0000 | [diff] [blame] | 37 | #include "talk/session/media/channel.h" |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 38 | #include "webrtc/base/messagehandler.h" |
| 39 | #include "webrtc/base/scoped_ref_ptr.h" |
| 40 | #include "webrtc/base/sigslot.h" |
kjellander | a96e2d7 | 2016-02-04 23:52:28 -0800 | [diff] [blame^] | 41 | #include "webrtc/media/base/mediachannel.h" |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 42 | |
| 43 | namespace webrtc { |
| 44 | |
wu@webrtc.org | 7818752 | 2013-10-07 23:32:02 +0000 | [diff] [blame] | 45 | class DataChannel; |
| 46 | |
| 47 | class DataChannelProviderInterface { |
| 48 | public: |
wu@webrtc.org | cecfd18 | 2013-10-30 05:18:12 +0000 | [diff] [blame] | 49 | // Sends the data to the transport. |
wu@webrtc.org | 7818752 | 2013-10-07 23:32:02 +0000 | [diff] [blame] | 50 | virtual bool SendData(const cricket::SendDataParams& params, |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 51 | const rtc::Buffer& payload, |
wu@webrtc.org | 7818752 | 2013-10-07 23:32:02 +0000 | [diff] [blame] | 52 | cricket::SendDataResult* result) = 0; |
wu@webrtc.org | cecfd18 | 2013-10-30 05:18:12 +0000 | [diff] [blame] | 53 | // Connects to the transport signals. |
wu@webrtc.org | 7818752 | 2013-10-07 23:32:02 +0000 | [diff] [blame] | 54 | virtual bool ConnectDataChannel(DataChannel* data_channel) = 0; |
wu@webrtc.org | cecfd18 | 2013-10-30 05:18:12 +0000 | [diff] [blame] | 55 | // Disconnects from the transport signals. |
wu@webrtc.org | 7818752 | 2013-10-07 23:32:02 +0000 | [diff] [blame] | 56 | virtual void DisconnectDataChannel(DataChannel* data_channel) = 0; |
wu@webrtc.org | cecfd18 | 2013-10-30 05:18:12 +0000 | [diff] [blame] | 57 | // Adds the data channel SID to the transport for SCTP. |
bemasc@webrtc.org | 9b5467e | 2014-12-04 23:16:52 +0000 | [diff] [blame] | 58 | virtual void AddSctpDataStream(int sid) = 0; |
wu@webrtc.org | cecfd18 | 2013-10-30 05:18:12 +0000 | [diff] [blame] | 59 | // Removes the data channel SID from the transport for SCTP. |
bemasc@webrtc.org | 9b5467e | 2014-12-04 23:16:52 +0000 | [diff] [blame] | 60 | virtual void RemoveSctpDataStream(int sid) = 0; |
wu@webrtc.org | 07a6fbe | 2013-11-04 18:41:34 +0000 | [diff] [blame] | 61 | // Returns true if the transport channel is ready to send data. |
| 62 | virtual bool ReadyToSendData() const = 0; |
wu@webrtc.org | 7818752 | 2013-10-07 23:32:02 +0000 | [diff] [blame] | 63 | |
| 64 | protected: |
| 65 | virtual ~DataChannelProviderInterface() {} |
| 66 | }; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 67 | |
henrika@webrtc.org | aebb1ad | 2014-01-14 10:00:58 +0000 | [diff] [blame] | 68 | struct InternalDataChannelInit : public DataChannelInit { |
| 69 | enum OpenHandshakeRole { |
| 70 | kOpener, |
| 71 | kAcker, |
| 72 | kNone |
| 73 | }; |
| 74 | // The default role is kOpener because the default |negotiated| is false. |
| 75 | InternalDataChannelInit() : open_handshake_role(kOpener) {} |
| 76 | explicit InternalDataChannelInit(const DataChannelInit& base) |
| 77 | : DataChannelInit(base), open_handshake_role(kOpener) { |
| 78 | // If the channel is externally negotiated, do not send the OPEN message. |
| 79 | if (base.negotiated) { |
| 80 | open_handshake_role = kNone; |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | OpenHandshakeRole open_handshake_role; |
| 85 | }; |
| 86 | |
deadbeef | ab9b2d1 | 2015-10-14 11:33:11 -0700 | [diff] [blame] | 87 | // Helper class to allocate unique IDs for SCTP DataChannels |
| 88 | class SctpSidAllocator { |
| 89 | public: |
| 90 | // Gets the first unused odd/even id based on the DTLS role. If |role| is |
| 91 | // SSL_CLIENT, the allocated id starts from 0 and takes even numbers; |
| 92 | // otherwise, the id starts from 1 and takes odd numbers. |
| 93 | // Returns false if no id can be allocated. |
| 94 | bool AllocateSid(rtc::SSLRole role, int* sid); |
| 95 | |
| 96 | // Attempts to reserve a specific sid. Returns false if it's unavailable. |
| 97 | bool ReserveSid(int sid); |
| 98 | |
| 99 | // Indicates that |sid| isn't in use any more, and is thus available again. |
| 100 | void ReleaseSid(int sid); |
| 101 | |
| 102 | private: |
| 103 | // Checks if |sid| is available to be assigned to a new SCTP data channel. |
| 104 | bool IsSidAvailable(int sid) const; |
| 105 | |
| 106 | std::set<int> used_sids_; |
| 107 | }; |
| 108 | |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 109 | // DataChannel is a an implementation of the DataChannelInterface based on |
wu@webrtc.org | cecfd18 | 2013-10-30 05:18:12 +0000 | [diff] [blame] | 110 | // libjingle's data engine. It provides an implementation of unreliable or |
| 111 | // reliabledata channels. Currently this class is specifically designed to use |
| 112 | // both RtpDataEngine and SctpDataEngine. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 113 | |
| 114 | // DataChannel states: |
wu@webrtc.org | cecfd18 | 2013-10-30 05:18:12 +0000 | [diff] [blame] | 115 | // kConnecting: The channel has been created the transport might not yet be |
| 116 | // ready. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 117 | // kOpen: The channel have a local SSRC set by a call to UpdateSendSsrc |
| 118 | // and a remote SSRC set by call to UpdateReceiveSsrc and the transport |
| 119 | // has been writable once. |
| 120 | // kClosing: DataChannelInterface::Close has been called or UpdateReceiveSsrc |
| 121 | // has been called with SSRC==0 |
| 122 | // kClosed: Both UpdateReceiveSsrc and UpdateSendSsrc has been called with |
| 123 | // SSRC==0. |
| 124 | class DataChannel : public DataChannelInterface, |
wu@webrtc.org | 07a6fbe | 2013-11-04 18:41:34 +0000 | [diff] [blame] | 125 | public sigslot::has_slots<>, |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 126 | public rtc::MessageHandler { |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 127 | public: |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 128 | static rtc::scoped_refptr<DataChannel> Create( |
wu@webrtc.org | cecfd18 | 2013-10-30 05:18:12 +0000 | [diff] [blame] | 129 | DataChannelProviderInterface* provider, |
wu@webrtc.org | 7818752 | 2013-10-07 23:32:02 +0000 | [diff] [blame] | 130 | cricket::DataChannelType dct, |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 131 | const std::string& label, |
henrika@webrtc.org | aebb1ad | 2014-01-14 10:00:58 +0000 | [diff] [blame] | 132 | const InternalDataChannelInit& config); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 133 | |
| 134 | virtual void RegisterObserver(DataChannelObserver* observer); |
| 135 | virtual void UnregisterObserver(); |
| 136 | |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 137 | virtual std::string label() const { return label_; } |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 138 | virtual bool reliable() const; |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 139 | virtual bool ordered() const { return config_.ordered; } |
Peter Boström | 0c4e06b | 2015-10-07 12:23:21 +0200 | [diff] [blame] | 140 | virtual uint16_t maxRetransmitTime() const { |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 141 | return config_.maxRetransmitTime; |
| 142 | } |
Peter Boström | 0c4e06b | 2015-10-07 12:23:21 +0200 | [diff] [blame] | 143 | virtual uint16_t maxRetransmits() const { return config_.maxRetransmits; } |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 144 | virtual std::string protocol() const { return config_.protocol; } |
| 145 | virtual bool negotiated() const { return config_.negotiated; } |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 146 | virtual int id() const { return config_.id; } |
Peter Boström | 0c4e06b | 2015-10-07 12:23:21 +0200 | [diff] [blame] | 147 | virtual uint64_t buffered_amount() const; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 148 | virtual void Close(); |
| 149 | virtual DataState state() const { return state_; } |
| 150 | virtual bool Send(const DataBuffer& buffer); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 151 | |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 152 | // rtc::MessageHandler override. |
| 153 | virtual void OnMessage(rtc::Message* msg); |
wu@webrtc.org | 07a6fbe | 2013-11-04 18:41:34 +0000 | [diff] [blame] | 154 | |
wu@webrtc.org | 91053e7 | 2013-08-10 07:18:04 +0000 | [diff] [blame] | 155 | // Called when the channel's ready to use. That can happen when the |
| 156 | // underlying DataMediaChannel becomes ready, or when this channel is a new |
| 157 | // stream on an existing DataMediaChannel, and we've finished negotiation. |
| 158 | void OnChannelReady(bool writable); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 159 | |
| 160 | // Sigslots from cricket::DataChannel |
| 161 | void OnDataReceived(cricket::DataChannel* channel, |
| 162 | const cricket::ReceiveDataParams& params, |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 163 | const rtc::Buffer& payload); |
deadbeef | ab9b2d1 | 2015-10-14 11:33:11 -0700 | [diff] [blame] | 164 | void OnStreamClosedRemotely(uint32_t sid); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 165 | |
wu@webrtc.org | cecfd18 | 2013-10-30 05:18:12 +0000 | [diff] [blame] | 166 | // The remote peer request that this channel should be closed. |
| 167 | void RemotePeerRequestClose(); |
| 168 | |
| 169 | // The following methods are for SCTP only. |
| 170 | |
jiayl@webrtc.org | b43c99d | 2014-06-20 17:11:14 +0000 | [diff] [blame] | 171 | // Sets the SCTP sid and adds to transport layer if not set yet. Should only |
| 172 | // be called once. |
wu@webrtc.org | cecfd18 | 2013-10-30 05:18:12 +0000 | [diff] [blame] | 173 | void SetSctpSid(int sid); |
| 174 | // Called when the transport channel is created. |
deadbeef | ab9b2d1 | 2015-10-14 11:33:11 -0700 | [diff] [blame] | 175 | // Only needs to be called for SCTP data channels. |
wu@webrtc.org | cecfd18 | 2013-10-30 05:18:12 +0000 | [diff] [blame] | 176 | void OnTransportChannelCreated(); |
deadbeef | ab9b2d1 | 2015-10-14 11:33:11 -0700 | [diff] [blame] | 177 | // Called when the transport channel is destroyed. |
| 178 | void OnTransportChannelDestroyed(); |
wu@webrtc.org | cecfd18 | 2013-10-30 05:18:12 +0000 | [diff] [blame] | 179 | |
| 180 | // The following methods are for RTP only. |
| 181 | |
| 182 | // Set the SSRC this channel should use to send data on the |
| 183 | // underlying data engine. |send_ssrc| == 0 means that the channel is no |
| 184 | // longer part of the session negotiation. |
Peter Boström | 0c4e06b | 2015-10-07 12:23:21 +0200 | [diff] [blame] | 185 | void SetSendSsrc(uint32_t send_ssrc); |
wu@webrtc.org | cecfd18 | 2013-10-30 05:18:12 +0000 | [diff] [blame] | 186 | // Set the SSRC this channel should use to receive data from the |
| 187 | // underlying data engine. |
Peter Boström | 0c4e06b | 2015-10-07 12:23:21 +0200 | [diff] [blame] | 188 | void SetReceiveSsrc(uint32_t receive_ssrc); |
wu@webrtc.org | cecfd18 | 2013-10-30 05:18:12 +0000 | [diff] [blame] | 189 | |
sergeyu@chromium.org | a23f0ca | 2013-11-13 22:48:52 +0000 | [diff] [blame] | 190 | cricket::DataChannelType data_channel_type() const { |
| 191 | return data_channel_type_; |
| 192 | } |
| 193 | |
deadbeef | ab9b2d1 | 2015-10-14 11:33:11 -0700 | [diff] [blame] | 194 | // Emitted when state transitions to kClosed. |
| 195 | // In the case of SCTP channels, this signal can be used to tell when the |
| 196 | // channel's sid is free. |
| 197 | sigslot::signal1<DataChannel*> SignalClosed; |
| 198 | |
wu@webrtc.org | 7818752 | 2013-10-07 23:32:02 +0000 | [diff] [blame] | 199 | protected: |
| 200 | DataChannel(DataChannelProviderInterface* client, |
| 201 | cricket::DataChannelType dct, |
| 202 | const std::string& label); |
| 203 | virtual ~DataChannel(); |
| 204 | |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 205 | private: |
jiayl@webrtc.org | b43c99d | 2014-06-20 17:11:14 +0000 | [diff] [blame] | 206 | // A packet queue which tracks the total queued bytes. Queued packets are |
| 207 | // owned by this class. |
| 208 | class PacketQueue { |
| 209 | public: |
| 210 | PacketQueue(); |
| 211 | ~PacketQueue(); |
| 212 | |
| 213 | size_t byte_count() const { |
| 214 | return byte_count_; |
| 215 | } |
| 216 | |
| 217 | bool Empty() const; |
| 218 | |
| 219 | DataBuffer* Front(); |
| 220 | |
| 221 | void Pop(); |
| 222 | |
| 223 | void Push(DataBuffer* packet); |
| 224 | |
| 225 | void Clear(); |
| 226 | |
| 227 | void Swap(PacketQueue* other); |
| 228 | |
| 229 | private: |
| 230 | std::deque<DataBuffer*> packets_; |
| 231 | size_t byte_count_; |
| 232 | }; |
| 233 | |
Lally Singh | 5c6c6e0 | 2015-05-29 11:52:39 -0400 | [diff] [blame] | 234 | // The OPEN(_ACK) signaling state. |
| 235 | enum HandshakeState { |
| 236 | kHandshakeInit, |
| 237 | kHandshakeShouldSendOpen, |
| 238 | kHandshakeShouldSendAck, |
| 239 | kHandshakeWaitingForAck, |
| 240 | kHandshakeReady |
| 241 | }; |
| 242 | |
henrika@webrtc.org | aebb1ad | 2014-01-14 10:00:58 +0000 | [diff] [blame] | 243 | bool Init(const InternalDataChannelInit& config); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 244 | void DoClose(); |
| 245 | void UpdateState(); |
| 246 | void SetState(DataState state); |
Lally Singh | 5c6c6e0 | 2015-05-29 11:52:39 -0400 | [diff] [blame] | 247 | void DisconnectFromProvider(); |
jiayl@webrtc.org | b43c99d | 2014-06-20 17:11:14 +0000 | [diff] [blame] | 248 | |
wu@webrtc.org | d64719d | 2013-08-01 00:00:07 +0000 | [diff] [blame] | 249 | void DeliverQueuedReceivedData(); |
jiayl@webrtc.org | b43c99d | 2014-06-20 17:11:14 +0000 | [diff] [blame] | 250 | |
| 251 | void SendQueuedDataMessages(); |
jiayl@webrtc.org | 6ca6190 | 2014-11-12 17:28:40 +0000 | [diff] [blame] | 252 | bool SendDataMessage(const DataBuffer& buffer, bool queue_if_blocked); |
jiayl@webrtc.org | b43c99d | 2014-06-20 17:11:14 +0000 | [diff] [blame] | 253 | bool QueueSendDataMessage(const DataBuffer& buffer); |
| 254 | |
| 255 | void SendQueuedControlMessages(); |
buildbot@webrtc.org | d4e598d | 2014-07-29 17:36:52 +0000 | [diff] [blame] | 256 | void QueueControlMessage(const rtc::Buffer& buffer); |
| 257 | bool SendControlMessage(const rtc::Buffer& buffer); |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 258 | |
| 259 | std::string label_; |
henrika@webrtc.org | aebb1ad | 2014-01-14 10:00:58 +0000 | [diff] [blame] | 260 | InternalDataChannelInit config_; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 261 | DataChannelObserver* observer_; |
| 262 | DataState state_; |
henrika@webrtc.org | 44461fa | 2014-01-13 09:35:02 +0000 | [diff] [blame] | 263 | cricket::DataChannelType data_channel_type_; |
| 264 | DataChannelProviderInterface* provider_; |
Lally Singh | 5c6c6e0 | 2015-05-29 11:52:39 -0400 | [diff] [blame] | 265 | HandshakeState handshake_state_; |
henrika@webrtc.org | aebb1ad | 2014-01-14 10:00:58 +0000 | [diff] [blame] | 266 | bool connected_to_provider_; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 267 | bool send_ssrc_set_; |
henrika@webrtc.org | 44461fa | 2014-01-13 09:35:02 +0000 | [diff] [blame] | 268 | bool receive_ssrc_set_; |
Lally Singh | 5c6c6e0 | 2015-05-29 11:52:39 -0400 | [diff] [blame] | 269 | bool writable_; |
Peter Boström | 0c4e06b | 2015-10-07 12:23:21 +0200 | [diff] [blame] | 270 | uint32_t send_ssrc_; |
| 271 | uint32_t receive_ssrc_; |
wu@webrtc.org | 91053e7 | 2013-08-10 07:18:04 +0000 | [diff] [blame] | 272 | // Control messages that always have to get sent out before any queued |
| 273 | // data. |
jiayl@webrtc.org | b43c99d | 2014-06-20 17:11:14 +0000 | [diff] [blame] | 274 | PacketQueue queued_control_data_; |
| 275 | PacketQueue queued_received_data_; |
| 276 | PacketQueue queued_send_data_; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 277 | }; |
| 278 | |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 279 | // Define proxy for DataChannelInterface. |
| 280 | BEGIN_PROXY_MAP(DataChannel) |
| 281 | PROXY_METHOD1(void, RegisterObserver, DataChannelObserver*) |
| 282 | PROXY_METHOD0(void, UnregisterObserver) |
| 283 | PROXY_CONSTMETHOD0(std::string, label) |
| 284 | PROXY_CONSTMETHOD0(bool, reliable) |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 285 | PROXY_CONSTMETHOD0(bool, ordered) |
Peter Boström | 0c4e06b | 2015-10-07 12:23:21 +0200 | [diff] [blame] | 286 | PROXY_CONSTMETHOD0(uint16_t, maxRetransmitTime) |
| 287 | PROXY_CONSTMETHOD0(uint16_t, maxRetransmits) |
wu@webrtc.org | 822fbd8 | 2013-08-15 23:38:54 +0000 | [diff] [blame] | 288 | PROXY_CONSTMETHOD0(std::string, protocol) |
| 289 | PROXY_CONSTMETHOD0(bool, negotiated) |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 290 | PROXY_CONSTMETHOD0(int, id) |
| 291 | PROXY_CONSTMETHOD0(DataState, state) |
Peter Boström | 0c4e06b | 2015-10-07 12:23:21 +0200 | [diff] [blame] | 292 | PROXY_CONSTMETHOD0(uint64_t, buffered_amount) |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 293 | PROXY_METHOD0(void, Close) |
| 294 | PROXY_METHOD1(bool, Send, const DataBuffer&) |
| 295 | END_PROXY() |
| 296 | |
| 297 | } // namespace webrtc |
| 298 | |
| 299 | #endif // TALK_APP_WEBRTC_DATACHANNEL_H_ |