// Copyright PA Knowledge Ltd 2021
// MIT License. For licence terms see LICENCE.md file.

#ifndef UDPSERVERINTERFACE_HPP
#define UDPSERVERINTERFACE_HPP

#include "BytesBuffer.hpp"

#include <functional>
#include <boost/asio/buffer.hpp>

class UdpServerInterface
{
public:
  explicit UdpServerInterface() = default;

  virtual ~UdpServerInterface() = default;

  using Callback_t = std::function<bool(BytesBuffer&&, BytesBuffer&&)>;

  void setCallback(Callback_t requestedCallback)
  {
    callback = requestedCallback;
  }

protected:
  Callback_t callback;
};

#endif //UDPSERVERINTERFACE_HPP
