Class Service

Nested Relationships

Nested Types

Class Documentation

class Service

A service.

Public Functions

~Service() = default

Default destructor.

Service(Service&&) noexcept = default

Default move constructor.

Service &operator=(Service&&) noexcept = default

Default move assignment.

Service(const Service&) = delete
Service &operator=(const Service&) = delete

Public Static Functions

static FoxgloveResult<Service> create(std::string_view name, ServiceSchema &schema, ServiceHandler &handler)

Constructs a new service.

The service will not be active until it is registered with a server using WebSocketServer::addService().

This constructor will fail with FoxgloveError::Utf8Error if the name is not a valid UTF-8 string.

Service implementation.

Parameters:
  • name – Locally unique service name.

  • schemaService schema.

  • handlerService handler callback.