25#include "../compat.hpp"
26#include "common_types.hpp"
27#include "http_client_config.hpp"
28#include "sse_message.hpp"
33namespace essence::net {
50 ES_API(CPPESSENCE)
void connect(
const uri& relative_uri)
const;
55 ES_API(CPPESSENCE)
void close()
const;
61 ES_API(CPPESSENCE)
void on_message(
const sse_message_handler& handler)
const;
67 ES_API(CPPESSENCE)
void on_error(
const error_handler& handler)
const;
72 std::unique_ptr<impl> impl_;
An http client operating on Server-Sent Events.
Definition sse_client.hpp:38
ES_API(CPPESSENCE) void connect(const uri &relative_uri) const
Connects to the SSE service and starts consuming messages.
ES_API(CPPESSENCE) void on_message(const sse_message_handler &handler) const
Registers a message callback.
ES_API(CPPESSENCE) void on_error(const error_handler &handler) const
Registers a error callback.
ES_API(CPPESSENCE) void close() const
Closes the connection.
Definition http_client_config.hpp:37