irccd  3.0.3
Classes | Functions
irccd::daemon::server_util Namespace Reference

Server utilities. More...

Classes

struct  message_type
 Pack a message and its type. More...
 

Functions

auto from_json (boost::asio::io_service &service, const nlohmann::json &object) -> std::shared_ptr< server >
 
auto from_config (boost::asio::io_service &service, const ini::section &sc) -> std::shared_ptr< server >
 

Detailed Description

Server utilities.

Function Documentation

◆ from_config()

auto irccd::daemon::server_util::from_config ( boost::asio::io_service &  service,
const ini::section sc 
) -> std::shared_ptr< server >

Convert a INI section to a server.

Parameters
servicethe io service
scthe server section
Returns
the server
Exceptions
server_erroron errors

◆ from_json()

auto irccd::daemon::server_util::from_json ( boost::asio::io_service &  service,
const nlohmann::json &  object 
) -> std::shared_ptr< server >

Convert a JSON object to a server.

Parameters
servicethe io service
objectthe object
Returns
the server
Exceptions
server_erroron errors