Piotr (Peter) Slatala | e0c2e97 | 2018-10-08 09:43:21 -0700 | [diff] [blame] | 1 | /* Copyright 2018 The WebRTC project authors. All Rights Reserved. |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 2 | * |
| 3 | * Use of this source code is governed by a BSD-style license |
| 4 | * that can be found in the LICENSE file in the root of the source |
| 5 | * tree. An additional intellectual property rights grant can be found |
| 6 | * in the file PATENTS. All contributing project authors may |
| 7 | * be found in the AUTHORS file in the root of the source tree. |
| 8 | */ |
| 9 | |
| 10 | // This is EXPERIMENTAL interface for media transport. |
| 11 | // |
| 12 | // The goal is to refactor WebRTC code so that audio and video frames |
| 13 | // are sent / received through the media transport interface. This will |
| 14 | // enable different media transport implementations, including QUIC-based |
| 15 | // media transport. |
| 16 | |
| 17 | #ifndef API_MEDIA_TRANSPORT_INTERFACE_H_ |
| 18 | #define API_MEDIA_TRANSPORT_INTERFACE_H_ |
| 19 | |
Piotr (Peter) Slatala | 6b9d823 | 2018-10-26 07:59:46 -0700 | [diff] [blame] | 20 | #include <api/transport/network_control.h> |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 21 | #include <memory> |
Piotr (Peter) Slatala | a0677d1 | 2018-10-29 07:31:42 -0700 | [diff] [blame] | 22 | #include <string> |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 23 | #include <utility> |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 24 | |
Piotr (Peter) Slatala | a0677d1 | 2018-10-29 07:31:42 -0700 | [diff] [blame] | 25 | #include "absl/types/optional.h" |
Yves Gerey | 988cc08 | 2018-10-23 12:03:01 +0200 | [diff] [blame] | 26 | #include "api/array_view.h" |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 27 | #include "api/rtc_error.h" |
Niels Möller | ec3b9ff | 2019-02-08 00:28:39 +0100 | [diff] [blame] | 28 | #include "api/transport/media/audio_transport.h" |
Niels Möller | 7e0e44f | 2019-02-12 14:04:11 +0100 | [diff] [blame^] | 29 | #include "api/transport/media/video_transport.h" |
Piotr (Peter) Slatala | 48c5493 | 2019-01-28 06:50:38 -0800 | [diff] [blame] | 30 | #include "api/units/data_rate.h" |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 31 | #include "rtc_base/copy_on_write_buffer.h" |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 32 | #include "rtc_base/network_route.h" |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 33 | |
| 34 | namespace rtc { |
| 35 | class PacketTransportInternal; |
| 36 | class Thread; |
| 37 | } // namespace rtc |
| 38 | |
| 39 | namespace webrtc { |
| 40 | |
Piotr (Peter) Slatala | 0c02250 | 2018-12-28 10:39:39 -0800 | [diff] [blame] | 41 | class RtcEventLog; |
| 42 | |
Piotr (Peter) Slatala | 309aafe | 2019-01-15 14:24:34 -0800 | [diff] [blame] | 43 | class AudioPacketReceivedObserver { |
| 44 | public: |
| 45 | virtual ~AudioPacketReceivedObserver() = default; |
| 46 | |
| 47 | // Invoked for the first received audio packet on a given channel id. |
| 48 | // It will be invoked once for each channel id. |
| 49 | virtual void OnFirstAudioPacketReceived(int64_t channel_id) = 0; |
| 50 | }; |
| 51 | |
Piotr (Peter) Slatala | 48c5493 | 2019-01-28 06:50:38 -0800 | [diff] [blame] | 52 | struct MediaTransportAllocatedBitrateLimits { |
| 53 | DataRate min_pacing_rate = DataRate::Zero(); |
| 54 | DataRate max_padding_bitrate = DataRate::Zero(); |
| 55 | DataRate max_total_allocated_bitrate = DataRate::Zero(); |
| 56 | }; |
| 57 | |
Piotr (Peter) Slatala | a0677d1 | 2018-10-29 07:31:42 -0700 | [diff] [blame] | 58 | // A collection of settings for creation of media transport. |
| 59 | struct MediaTransportSettings final { |
| 60 | MediaTransportSettings(); |
Piotr (Peter) Slatala | ed7b8b1 | 2018-10-29 10:43:16 -0700 | [diff] [blame] | 61 | MediaTransportSettings(const MediaTransportSettings&); |
| 62 | MediaTransportSettings& operator=(const MediaTransportSettings&); |
Piotr (Peter) Slatala | a0677d1 | 2018-10-29 07:31:42 -0700 | [diff] [blame] | 63 | ~MediaTransportSettings(); |
| 64 | |
| 65 | // Group calls are not currently supported, in 1:1 call one side must set |
| 66 | // is_caller = true and another is_caller = false. |
| 67 | bool is_caller; |
| 68 | |
| 69 | // Must be set if a pre-shared key is used for the call. |
Piotr (Peter) Slatala | 9f95625 | 2018-10-31 08:25:26 -0700 | [diff] [blame] | 70 | // TODO(bugs.webrtc.org/9944): This should become zero buffer in the distant |
| 71 | // future. |
Piotr (Peter) Slatala | a0677d1 | 2018-10-29 07:31:42 -0700 | [diff] [blame] | 72 | absl::optional<std::string> pre_shared_key; |
Piotr (Peter) Slatala | 0c02250 | 2018-12-28 10:39:39 -0800 | [diff] [blame] | 73 | |
| 74 | // If present, provides the event log that media transport should use. |
| 75 | // Media transport does not own it. The lifetime of |event_log| will exceed |
| 76 | // the lifetime of the instance of MediaTransportInterface instance. |
| 77 | RtcEventLog* event_log = nullptr; |
Piotr (Peter) Slatala | a0677d1 | 2018-10-29 07:31:42 -0700 | [diff] [blame] | 78 | }; |
| 79 | |
Piotr (Peter) Slatala | ada077f | 2018-11-08 07:43:31 -0800 | [diff] [blame] | 80 | // Callback to notify about network route changes. |
| 81 | class MediaTransportNetworkChangeCallback { |
| 82 | public: |
| 83 | virtual ~MediaTransportNetworkChangeCallback() = default; |
| 84 | |
| 85 | // Called when the network route is changed, with the new network route. |
| 86 | virtual void OnNetworkRouteChanged( |
| 87 | const rtc::NetworkRoute& new_network_route) = 0; |
| 88 | }; |
| 89 | |
Bjorn Mellem | c78b0ea | 2018-10-29 15:21:31 -0700 | [diff] [blame] | 90 | // State of the media transport. Media transport begins in the pending state. |
| 91 | // It transitions to writable when it is ready to send media. It may transition |
| 92 | // back to pending if the connection is blocked. It may transition to closed at |
| 93 | // any time. Closed is terminal: a transport will never re-open once closed. |
| 94 | enum class MediaTransportState { |
| 95 | kPending, |
| 96 | kWritable, |
| 97 | kClosed, |
| 98 | }; |
| 99 | |
| 100 | // Callback invoked whenever the state of the media transport changes. |
| 101 | class MediaTransportStateCallback { |
| 102 | public: |
| 103 | virtual ~MediaTransportStateCallback() = default; |
| 104 | |
| 105 | // Invoked whenever the state of the media transport changes. |
| 106 | virtual void OnStateChanged(MediaTransportState state) = 0; |
| 107 | }; |
| 108 | |
Niels Möller | 4687915 | 2019-01-07 15:54:47 +0100 | [diff] [blame] | 109 | // Callback for RTT measurements on the receive side. |
| 110 | // TODO(nisse): Related interfaces: CallStatsObserver and RtcpRttStats. It's |
| 111 | // somewhat unclear what type of measurement is needed. It's used to configure |
| 112 | // NACK generation and playout buffer. Either raw measurement values or recent |
| 113 | // maximum would make sense for this use. Need consolidation of RTT signalling. |
| 114 | class MediaTransportRttObserver { |
| 115 | public: |
| 116 | virtual ~MediaTransportRttObserver() = default; |
| 117 | |
| 118 | // Invoked when a new RTT measurement is available, typically once per ACK. |
| 119 | virtual void OnRttUpdated(int64_t rtt_ms) = 0; |
| 120 | }; |
| 121 | |
Bjorn Mellem | 1f6aa9f | 2018-10-30 15:15:00 -0700 | [diff] [blame] | 122 | // Supported types of application data messages. |
| 123 | enum class DataMessageType { |
| 124 | // Application data buffer with the binary bit unset. |
| 125 | kText, |
| 126 | |
| 127 | // Application data buffer with the binary bit set. |
| 128 | kBinary, |
| 129 | |
| 130 | // Transport-agnostic control messages, such as open or open-ack messages. |
| 131 | kControl, |
| 132 | }; |
| 133 | |
| 134 | // Parameters for sending data. The parameters may change from message to |
| 135 | // message, even within a single channel. For example, control messages may be |
| 136 | // sent reliably and in-order, even if the data channel is configured for |
| 137 | // unreliable delivery. |
| 138 | struct SendDataParams { |
| 139 | SendDataParams(); |
Niels Möller | e0446cb | 2018-11-30 09:35:52 +0100 | [diff] [blame] | 140 | SendDataParams(const SendDataParams&); |
Bjorn Mellem | 1f6aa9f | 2018-10-30 15:15:00 -0700 | [diff] [blame] | 141 | |
| 142 | DataMessageType type = DataMessageType::kText; |
| 143 | |
| 144 | // Whether to deliver the message in order with respect to other ordered |
| 145 | // messages with the same channel_id. |
| 146 | bool ordered = false; |
| 147 | |
| 148 | // If set, the maximum number of times this message may be |
| 149 | // retransmitted by the transport before it is dropped. |
| 150 | // Setting this value to zero disables retransmission. |
| 151 | // Must be non-negative. |max_rtx_count| and |max_rtx_ms| may not be set |
| 152 | // simultaneously. |
| 153 | absl::optional<int> max_rtx_count; |
| 154 | |
| 155 | // If set, the maximum number of milliseconds for which the transport |
| 156 | // may retransmit this message before it is dropped. |
| 157 | // Setting this value to zero disables retransmission. |
| 158 | // Must be non-negative. |max_rtx_count| and |max_rtx_ms| may not be set |
| 159 | // simultaneously. |
| 160 | absl::optional<int> max_rtx_ms; |
| 161 | }; |
| 162 | |
| 163 | // Sink for callbacks related to a data channel. |
| 164 | class DataChannelSink { |
| 165 | public: |
| 166 | virtual ~DataChannelSink() = default; |
| 167 | |
| 168 | // Callback issued when data is received by the transport. |
| 169 | virtual void OnDataReceived(int channel_id, |
| 170 | DataMessageType type, |
| 171 | const rtc::CopyOnWriteBuffer& buffer) = 0; |
| 172 | |
| 173 | // Callback issued when a remote data channel begins the closing procedure. |
| 174 | // Messages sent after the closing procedure begins will not be transmitted. |
| 175 | virtual void OnChannelClosing(int channel_id) = 0; |
| 176 | |
| 177 | // Callback issued when a (remote or local) data channel completes the closing |
| 178 | // procedure. Closing channels become closed after all pending data has been |
| 179 | // transmitted. |
| 180 | virtual void OnChannelClosed(int channel_id) = 0; |
| 181 | }; |
| 182 | |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 183 | // Media transport interface for sending / receiving encoded audio/video frames |
| 184 | // and receiving bandwidth estimate update from congestion control. |
| 185 | class MediaTransportInterface { |
| 186 | public: |
Piotr (Peter) Slatala | 309aafe | 2019-01-15 14:24:34 -0800 | [diff] [blame] | 187 | MediaTransportInterface(); |
| 188 | virtual ~MediaTransportInterface(); |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 189 | |
Piotr (Peter) Slatala | e804f92 | 2018-09-25 08:40:30 -0700 | [diff] [blame] | 190 | // Start asynchronous send of audio frame. The status returned by this method |
| 191 | // only pertains to the synchronous operations (e.g. |
| 192 | // serialization/packetization), not to the asynchronous operation. |
| 193 | |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 194 | virtual RTCError SendAudioFrame(uint64_t channel_id, |
| 195 | MediaTransportEncodedAudioFrame frame) = 0; |
| 196 | |
Piotr (Peter) Slatala | e804f92 | 2018-09-25 08:40:30 -0700 | [diff] [blame] | 197 | // Start asynchronous send of video frame. The status returned by this method |
| 198 | // only pertains to the synchronous operations (e.g. |
| 199 | // serialization/packetization), not to the asynchronous operation. |
| 200 | virtual RTCError SendVideoFrame( |
| 201 | uint64_t channel_id, |
| 202 | const MediaTransportEncodedVideoFrame& frame) = 0; |
| 203 | |
Niels Möller | 1c7f5f6 | 2018-12-10 11:06:02 +0100 | [diff] [blame] | 204 | // Used by video sender to be notified on key frame requests. |
| 205 | virtual void SetKeyFrameRequestCallback( |
| 206 | MediaTransportKeyFrameRequestCallback* callback); |
| 207 | |
Piotr (Peter) Slatala | e804f92 | 2018-09-25 08:40:30 -0700 | [diff] [blame] | 208 | // Requests a keyframe for the particular channel (stream). The caller should |
| 209 | // check that the keyframe is not present in a jitter buffer already (i.e. |
| 210 | // don't request a keyframe if there is one that you will get from the jitter |
| 211 | // buffer in a moment). |
| 212 | virtual RTCError RequestKeyFrame(uint64_t channel_id) = 0; |
| 213 | |
| 214 | // Sets audio sink. Sink must be unset by calling SetReceiveAudioSink(nullptr) |
| 215 | // before the media transport is destroyed or before new sink is set. |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 216 | virtual void SetReceiveAudioSink(MediaTransportAudioSinkInterface* sink) = 0; |
| 217 | |
Piotr (Peter) Slatala | e804f92 | 2018-09-25 08:40:30 -0700 | [diff] [blame] | 218 | // Registers a video sink. Before destruction of media transport, you must |
| 219 | // pass a nullptr. |
| 220 | virtual void SetReceiveVideoSink(MediaTransportVideoSinkInterface* sink) = 0; |
| 221 | |
Piotr (Peter) Slatala | ada077f | 2018-11-08 07:43:31 -0800 | [diff] [blame] | 222 | // Adds a target bitrate observer. Before media transport is destructed |
| 223 | // the observer must be unregistered (by calling |
| 224 | // RemoveTargetTransferRateObserver). |
| 225 | // A newly registered observer will be called back with the latest recorded |
| 226 | // target rate, if available. |
| 227 | virtual void AddTargetTransferRateObserver( |
Niels Möller | 4687915 | 2019-01-07 15:54:47 +0100 | [diff] [blame] | 228 | TargetTransferRateObserver* observer); |
Piotr (Peter) Slatala | ada077f | 2018-11-08 07:43:31 -0800 | [diff] [blame] | 229 | |
| 230 | // Removes an existing |observer| from observers. If observer was never |
| 231 | // registered, an error is logged and method does nothing. |
| 232 | virtual void RemoveTargetTransferRateObserver( |
Niels Möller | 4687915 | 2019-01-07 15:54:47 +0100 | [diff] [blame] | 233 | TargetTransferRateObserver* observer); |
| 234 | |
Piotr (Peter) Slatala | 309aafe | 2019-01-15 14:24:34 -0800 | [diff] [blame] | 235 | // Sets audio packets observer, which gets informed about incoming audio |
| 236 | // packets. Before destruction, the observer must be unregistered by setting |
| 237 | // nullptr. |
| 238 | // |
| 239 | // This method may be temporary, when the multiplexer is implemented (or |
| 240 | // multiplexer may use it to demultiplex channel ids). |
| 241 | virtual void SetFirstAudioPacketReceivedObserver( |
| 242 | AudioPacketReceivedObserver* observer); |
| 243 | |
Niels Möller | 4687915 | 2019-01-07 15:54:47 +0100 | [diff] [blame] | 244 | // Intended for receive side. AddRttObserver registers an observer to be |
| 245 | // called for each RTT measurement, typically once per ACK. Before media |
| 246 | // transport is destructed the observer must be unregistered. |
| 247 | virtual void AddRttObserver(MediaTransportRttObserver* observer); |
| 248 | virtual void RemoveRttObserver(MediaTransportRttObserver* observer); |
Piotr (Peter) Slatala | ada077f | 2018-11-08 07:43:31 -0800 | [diff] [blame] | 249 | |
| 250 | // Returns the last known target transfer rate as reported to the above |
| 251 | // observers. |
| 252 | virtual absl::optional<TargetTransferRate> GetLatestTargetTransferRate(); |
| 253 | |
| 254 | // Gets the audio packet overhead in bytes. Returned overhead does not include |
| 255 | // transport overhead (ipv4/6, turn channeldata, tcp/udp, etc.). |
| 256 | // If the transport is capable of fusing packets together, this overhead |
| 257 | // might not be a very accurate number. |
| 258 | virtual size_t GetAudioPacketOverhead() const; |
| 259 | |
Niels Möller | d70a114 | 2019-02-06 17:36:29 +0100 | [diff] [blame] | 260 | // Registers an observer for network change events. If the network route is |
| 261 | // already established when the callback is added, |callback| will be called |
| 262 | // immediately with the current network route. Before media transport is |
| 263 | // destroyed, the callback must be removed. |
Niels Möller | 30b182a | 2019-02-05 00:59:35 +0100 | [diff] [blame] | 264 | virtual void AddNetworkChangeCallback( |
| 265 | MediaTransportNetworkChangeCallback* callback); |
| 266 | virtual void RemoveNetworkChangeCallback( |
| 267 | MediaTransportNetworkChangeCallback* callback); |
Piotr (Peter) Slatala | 6b9d823 | 2018-10-26 07:59:46 -0700 | [diff] [blame] | 268 | |
Bjorn Mellem | c78b0ea | 2018-10-29 15:21:31 -0700 | [diff] [blame] | 269 | // Sets a state observer callback. Before media transport is destroyed, the |
| 270 | // callback must be unregistered by setting it to nullptr. |
| 271 | // A newly registered callback will be called with the current state. |
| 272 | // Media transport does not invoke this callback concurrently. |
Bjorn Mellem | c78b0ea | 2018-10-29 15:21:31 -0700 | [diff] [blame] | 273 | virtual void SetMediaTransportStateCallback( |
Bjorn Mellem | eb2c641 | 2018-10-31 15:25:32 -0700 | [diff] [blame] | 274 | MediaTransportStateCallback* callback) = 0; |
Bjorn Mellem | c78b0ea | 2018-10-29 15:21:31 -0700 | [diff] [blame] | 275 | |
Piotr (Peter) Slatala | 48c5493 | 2019-01-28 06:50:38 -0800 | [diff] [blame] | 276 | // Updates allocation limits. |
| 277 | // TODO(psla): Make abstract when downstream implementation implement it. |
| 278 | virtual void SetAllocatedBitrateLimits( |
| 279 | const MediaTransportAllocatedBitrateLimits& limits); |
| 280 | |
Bjorn Mellem | 1f6aa9f | 2018-10-30 15:15:00 -0700 | [diff] [blame] | 281 | // Sends a data buffer to the remote endpoint using the given send parameters. |
| 282 | // |buffer| may not be larger than 256 KiB. Returns an error if the send |
| 283 | // fails. |
Bjorn Mellem | 1f6aa9f | 2018-10-30 15:15:00 -0700 | [diff] [blame] | 284 | virtual RTCError SendData(int channel_id, |
| 285 | const SendDataParams& params, |
Bjorn Mellem | eb2c641 | 2018-10-31 15:25:32 -0700 | [diff] [blame] | 286 | const rtc::CopyOnWriteBuffer& buffer) = 0; |
Bjorn Mellem | 1f6aa9f | 2018-10-30 15:15:00 -0700 | [diff] [blame] | 287 | |
| 288 | // Closes |channel_id| gracefully. Returns an error if |channel_id| is not |
| 289 | // open. Data sent after the closing procedure begins will not be |
| 290 | // transmitted. The channel becomes closed after pending data is transmitted. |
Bjorn Mellem | eb2c641 | 2018-10-31 15:25:32 -0700 | [diff] [blame] | 291 | virtual RTCError CloseChannel(int channel_id) = 0; |
Bjorn Mellem | 1f6aa9f | 2018-10-30 15:15:00 -0700 | [diff] [blame] | 292 | |
| 293 | // Sets a sink for data messages and channel state callbacks. Before media |
| 294 | // transport is destroyed, the sink must be unregistered by setting it to |
| 295 | // nullptr. |
Bjorn Mellem | eb2c641 | 2018-10-31 15:25:32 -0700 | [diff] [blame] | 296 | virtual void SetDataSink(DataChannelSink* sink) = 0; |
Bjorn Mellem | 1f6aa9f | 2018-10-30 15:15:00 -0700 | [diff] [blame] | 297 | |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 298 | // TODO(sukhanov): RtcEventLogs. |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 299 | }; |
| 300 | |
| 301 | // If media transport factory is set in peer connection factory, it will be |
| 302 | // used to create media transport for sending/receiving encoded frames and |
| 303 | // this transport will be used instead of default RTP/SRTP transport. |
| 304 | // |
| 305 | // Currently Media Transport negotiation is not supported in SDP. |
| 306 | // If application is using media transport, it must negotiate it before |
| 307 | // setting media transport factory in peer connection. |
| 308 | class MediaTransportFactory { |
| 309 | public: |
| 310 | virtual ~MediaTransportFactory() = default; |
| 311 | |
| 312 | // Creates media transport. |
| 313 | // - Does not take ownership of packet_transport or network_thread. |
| 314 | // - Does not support group calls, in 1:1 call one side must set |
| 315 | // is_caller = true and another is_caller = false. |
Piotr (Peter) Slatala | a0677d1 | 2018-10-29 07:31:42 -0700 | [diff] [blame] | 316 | // TODO(bugs.webrtc.org/9938) This constructor will be removed and replaced |
| 317 | // with the one below. |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 318 | virtual RTCErrorOr<std::unique_ptr<MediaTransportInterface>> |
| 319 | CreateMediaTransport(rtc::PacketTransportInternal* packet_transport, |
| 320 | rtc::Thread* network_thread, |
Piotr (Peter) Slatala | a0677d1 | 2018-10-29 07:31:42 -0700 | [diff] [blame] | 321 | bool is_caller); |
| 322 | |
| 323 | // Creates media transport. |
| 324 | // - Does not take ownership of packet_transport or network_thread. |
| 325 | // TODO(bugs.webrtc.org/9938): remove default implementation once all children |
| 326 | // override it. |
| 327 | virtual RTCErrorOr<std::unique_ptr<MediaTransportInterface>> |
| 328 | CreateMediaTransport(rtc::PacketTransportInternal* packet_transport, |
| 329 | rtc::Thread* network_thread, |
Piotr (Peter) Slatala | ed7b8b1 | 2018-10-29 10:43:16 -0700 | [diff] [blame] | 330 | const MediaTransportSettings& settings); |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 331 | }; |
| 332 | |
| 333 | } // namespace webrtc |
Anton Sukhanov | f60bd4b | 2018-09-05 13:41:46 -0400 | [diff] [blame] | 334 | #endif // API_MEDIA_TRANSPORT_INTERFACE_H_ |