#pragma once

#include "zmq.hpp"
#include "opencv2/opencv.hpp"

class ZMQClient
{
public:
    bool cancel;
  ZMQClient();
  ~ZMQClient();

  void connect(std::string address);
  std::string receiveMessage();
  // the sendMore parameter determines, whether this message is part of a multi-part-message
  std::string sendMessageToServer(const void *messageData, int messageLength, bool sendMore);
  std::string sendStringToServer(std::string messageStr, bool sendMore);
  std::string sendStringsToServer(std::vector<std::string> messages, bool sendMore);
  std::string sendImageToServer(cv::Mat image, bool sendMore);
private:
  std::string addr;
  zmq::context_t context;
  zmq::socket_t socket;
};