Loading...
Searching...
No Matches
LinHttpHandler.h
Go to the documentation of this file.
#ifndef INCLUDE_HUEPLUSPLUS_LINHTTPHANDLER_H
#define INCLUDE_HUEPLUSPLUS_LINHTTPHANDLER_H
#include <string>
#include <vector>
#include "BaseHttpHandler.h"
#include <nlohmann/json.hpp>
namespace hueplusplus
{
class LinHttpHandler : public BaseHttpHandler
{
public:
virtual std::string send(const std::string& msg, const std::string& adr, int port = 80) const override;
std::vector<std::string> sendMulticast(const std::string& msg, const std::string& adr = "239.255.255.250",
int port = 1900, std::chrono::steady_clock::duration timeout = std::chrono::seconds(5)) const override;
};
} // namespace hueplusplus
#endif
BaseHttpHandler.h
hueplusplus::BaseHttpHandler
Base class for classes that handle http requests and multicast requests.
Definition BaseHttpHandler.h:39
hueplusplus::LinHttpHandler
Class to handle http requests and multicast requests on linux systems.
Definition LinHttpHandler.h:37
hueplusplus::LinHttpHandler::sendMulticast
std::vector< std::string > sendMulticast(const std::string &msg, const std::string &adr="239.255.255.250", int port=1900, std::chrono::steady_clock::duration timeout=std::chrono::seconds(5)) const override
Function that sends a multicast request with the specified message.
Definition LinHttpHandler.cpp:141
hueplusplus::LinHttpHandler::send
virtual std::string send(const std::string &msg, const std::string &adr, int port=80) const override
Function that sends a given message to the specified host and returns the response.
Definition LinHttpHandler.cpp:53
hueplusplus
Namespace for the hueplusplus library.
Definition Action.h:28