chromium/third_party/openscreen/src/cast/common/channel/cast_socket_message_port.cc

// 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.

#include "cast/common/channel/cast_socket_message_port.h"

#include <utility>

#include "cast/common/channel/message_util.h"
#include "cast/common/channel/proto/cast_channel.pb.h"
#include "cast/common/channel/virtual_connection.h"

namespace openscreen::cast {

CastSocketMessagePort::CastSocketMessagePort(VirtualConnectionRouter& router)
    :{}

CastSocketMessagePort::~CastSocketMessagePort() {}

// NOTE: we assume here that this message port is already the client for
// the passed in socket, so leave the socket's client unchanged. However,
// since sockets should map one to one with receiver sessions, we reset our
// client. The consumer of this message port should call SetClient with the new
// message port client after setting the socket.
void CastSocketMessagePort::SetSocket(WeakPtr<CastSocket> socket) {}

int CastSocketMessagePort::GetSocketId() {}

void CastSocketMessagePort::SetClient(MessagePort::Client& client) {}

void CastSocketMessagePort::ResetClient() {}

void CastSocketMessagePort::PostMessage(
    const std::string& destination_sender_id,
    const std::string& message_namespace,
    const std::string& message) {}

void CastSocketMessagePort::OnMessage(VirtualConnectionRouter* router,
                                      CastSocket* socket,
                                      proto::CastMessage message) {}

}  // namespace openscreen::cast