chromium/remoting/protocol/pseudotcp_adapter.h

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef REMOTING_PROTOCOL_PSEUDOTCP_ADAPTER_H_
#define REMOTING_PROTOCOL_PSEUDOTCP_ADAPTER_H_

#include <stdint.h>

#include <memory>

#include "base/compiler_specific.h"
#include "base/memory/scoped_refptr.h"
#include "base/sequence_checker.h"
#include "net/log/net_log_with_source.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "remoting/protocol/p2p_stream_socket.h"
#include "third_party/webrtc/p2p/base/pseudo_tcp.h"

namespace remoting::protocol {

class P2PDatagramSocket;

// PseudoTcpAdapter adapts a P2PDatagramSocket to P2PStreamSocket using
// PseudoTcp. Because P2PStreamSockets can be deleted during callbacks,
// while PseudoTcp cannot, the core of the PseudoTcpAdapter is reference
// counted, with a reference held by the adapter, and an additional reference
// held on the stack during callbacks.
class PseudoTcpAdapter : public P2PStreamSocket {};

}  // namespace remoting::protocol

#endif  // REMOTING_PROTOCOL_PSEUDOTCP_ADAPTER_H_