// 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_PUBLIC_CAST_SOCKET_H_ #define CAST_COMMON_PUBLIC_CAST_SOCKET_H_ #include <array> #include <memory> #include <vector> #include "platform/api/tls_connection.h" #include "util/weak_ptr.h" namespace openscreen::cast { namespace proto { class CastMessage; } // Represents a simple message-oriented socket for communicating with the Cast // V2 protocol. It isn't thread-safe, so it should only be used on the same // TaskRunner thread as its TlsConnection. class CastSocket : public TlsConnection::Client { … }; // Returns socket->socket_id() if |socket| is not null, otherwise 0. constexpr int ToCastSocketId(CastSocket* socket) { … } } // namespace openscreen::cast #endif // CAST_COMMON_PUBLIC_CAST_SOCKET_H_