chromium/third_party/openscreen/src/cast/common/channel/testing/fake_cast_socket.h

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

#ifndef CAST_COMMON_CHANNEL_TESTING_FAKE_CAST_SOCKET_H_
#define CAST_COMMON_CHANNEL_TESTING_FAKE_CAST_SOCKET_H_

#include <memory>
#include <utility>
#include <vector>

#include "cast/common/channel/proto/cast_channel.pb.h"
#include "cast/common/public/cast_socket.h"
#include "gmock/gmock.h"
#include "platform/test/mock_tls_connection.h"

namespace openscreen::cast {

class MockCastSocketClient final : public CastSocket::Client {};

struct FakeCastSocket {};

// Two FakeCastSockets that are piped together via their MockTlsConnection
// read/write methods.  Calling SendMessage on |socket| will result in an
// OnMessage callback on |mock_peer_client| and vice versa for |peer_socket| and
// |mock_client|.
struct FakeCastSocketPair {};

}  // namespace openscreen::cast

#endif  // CAST_COMMON_CHANNEL_TESTING_FAKE_CAST_SOCKET_H_