#pragma once

#include "data_handler.hpp"

#include <unistd.h>

#include <cstdint>
#include <optional>
#include <stdplus/handle/managed.hpp>
#include <vector>

namespace ipmi_flash
{

/**
 * Data Handler for receiving the image over a network port
 */
class NetDataHandler : public DataInterface
{
  public:
    NetDataHandler() : listenFd(std::nullopt), connFd(std::nullopt)
    {
    }

    bool open() override;
    bool close() override;
    std::vector<std::uint8_t> copyFrom(std::uint32_t length) override;
    bool writeMeta(const std::vector<std::uint8_t>& configuration) override;
    std::vector<std::uint8_t> readMeta() override;

    static constexpr std::uint16_t listenPort = 623;
    static constexpr int timeoutS = 5;

  private:
    static void closefd(int&& fd)
    {
        ::close(fd);
    }
    using Fd = stdplus::Managed<int>::Handle<closefd>;

    Fd listenFd;
    Fd connFd;
};

} // namespace ipmi_flash
