Files
nearby/cpp/core/internal/base_bwu_handler.h
T
Alexey Polyudov 2155b3ddeb Roll forward to cl/338482889
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
Change-Id: I9850950db8bd84f0904ea1a413151887f52098cf
2020-10-22 10:47:34 -07:00

49 lines
1.5 KiB
C++

#ifndef CORE_INTERNAL_BASE_BWU_HANDLER_H_
#define CORE_INTERNAL_BASE_BWU_HANDLER_H_
#include <cstdint>
#include <memory>
#include <string>
#include "core/internal/bwu_handler.h"
#include "core/internal/client_proxy.h"
#include "core/internal/endpoint_channel_manager.h"
#include "proto/connections/offline_wire_formats.pb.h"
#include "platform/public/cancelable_alarm.h"
#include "platform/public/count_down_latch.h"
#include "platform/public/scheduled_executor.h"
#include "platform/public/single_thread_executor.h"
#include "proto/connections_enums.pb.h"
#include "absl/container/flat_hash_map.h"
#include "absl/time/clock.h"
namespace location {
namespace nearby {
namespace connections {
class BaseBwuHandler : public BwuHandler {
public:
using ClientIntroduction = BwuNegotiationFrame::ClientIntroduction;
BaseBwuHandler(EndpointChannelManager& channel_manager,
BwuNotifications bwu_notifications)
: channel_manager_(&channel_manager),
bwu_notifications_(std::move(bwu_notifications)) {}
~BaseBwuHandler() override = default;
void OnIncomingConnection(ClientProxy* client,
IncomingSocketConnection* connection);
protected:
// Represents the incoming Socket the Initiator has gotten after initializing
// its upgraded bandwidth medium.
EndpointChannelManager* GetEndpointChannelManager();
EndpointChannelManager* channel_manager_;
BwuNotifications bwu_notifications_;
};
} // namespace connections
} // namespace nearby
} // namespace location
#endif // CORE_INTERNAL_BASE_BWU_HANDLER_H_