C++ Essence Library 0.1.0
A Utility Library for Modern C++ Programming
Loading...
Searching...
No Matches
essence::net::abstract::sse_connection Class Reference

An interface: manages an SSE connection and its lifetime. More...

#include <sse_connection.hpp>

Public Member Functions

template<typename T >
requires (!std::same_as<std::decay_t<T>, sse_connection>)
 sse_connection (T &&value)
 
bool canceled () const
 Checks whether the internal operation has been canceled and if true the user must stop all invocations to this object.
 
uri request_uri () const
 Gets the request URI.
 
abi::string remote_address () const
 Gets the remote address.
 
void send_message (const sse_message &message) const
 Sends a message to the client.
 
void tick () const
 Keep alive and raise an error when the network is disconnected.
 
void close () const
 Closes the connection.
 
void * underlying_ptr () const
 Gets the underlying pointer.
 

Detailed Description

An interface: manages an SSE connection and its lifetime.

Member Function Documentation

◆ canceled()

bool essence::net::abstract::sse_connection::canceled ( ) const
inlinenodiscard

Checks whether the internal operation has been canceled and if true the user must stop all invocations to this object.

Returns
true if the internal operation has been canceled; otherwise false.

◆ remote_address()

abi::string essence::net::abstract::sse_connection::remote_address ( ) const
inlinenodiscard

Gets the remote address.

Returns
The remote address.

◆ request_uri()

uri essence::net::abstract::sse_connection::request_uri ( ) const
inlinenodiscard

Gets the request URI.

Returns
The URI.

◆ underlying_ptr()

void * essence::net::abstract::sse_connection::underlying_ptr ( ) const
inlinenodiscard

Gets the underlying pointer.

Returns
The underlying pointer.

The documentation for this class was generated from the following file: