![]() |
Tacopie
3.0.0
Tacopie is a TCP Client & Server C++11 library.
|
Namespaces | |
utils | |
Classes | |
class | io_service |
class | logger |
class | logger_iface |
class | self_pipe |
class | tacopie_error |
class | tcp_client |
class | tcp_server |
class | tcp_socket |
Typedefs | |
typedef int | fd_t |
file descriptor platform type More... | |
Functions | |
const std::shared_ptr< io_service > & | get_default_io_service (std::uint32_t num_io_workers=1) |
void | set_default_io_service (const std::shared_ptr< io_service > &service) |
void | debug (const std::string &msg, const std::string &file, std::size_t line) |
void | info (const std::string &msg, const std::string &file, std::size_t line) |
void | warn (const std::string &msg, const std::string &file, std::size_t line) |
void | error (const std::string &msg, const std::string &file, std::size_t line) |
Variables | |
std::unique_ptr< logger_iface > | active_logger |
typedef int tacopie::fd_t |
file descriptor platform type
void tacopie::debug | ( | const std::string & | msg, |
const std::string & | file, | ||
std::size_t | line | ||
) |
debug logging convenience function used internaly to call the logger
msg | message to be logged |
file | file from which the message is coming |
line | line in the file of the message |
void tacopie::error | ( | const std::string & | msg, |
const std::string & | file, | ||
std::size_t | line | ||
) |
error logging convenience function used internaly to call the logger
msg | message to be logged |
file | file from which the message is coming |
line | line in the file of the message |
const std::shared_ptr<io_service>& tacopie::get_default_io_service | ( | std::uint32_t | num_io_workers = 1 | ) |
default io_service getter & setter if the default is fetched for the first time, build it, otherwise return the current instance if the io_service already exist, return it and reset its number of workers if necessary
num_io_workers | defines the number of background threads that will be used to process read and write callbacks. This must be a strictly positive value. |
void tacopie::info | ( | const std::string & | msg, |
const std::string & | file, | ||
std::size_t | line | ||
) |
info logging convenience function used internaly to call the logger
msg | message to be logged |
file | file from which the message is coming |
line | line in the file of the message |
void tacopie::set_default_io_service | ( | const std::shared_ptr< io_service > & | service | ) |
set the default io_service to be returned by get_default_io_service
service | the service to be used as the default io_service instance |
void tacopie::warn | ( | const std::string & | msg, |
const std::string & | file, | ||
std::size_t | line | ||
) |
warn logging convenience function used internaly to call the logger
msg | message to be logged |
file | file from which the message is coming |
line | line in the file of the message |
std::unique_ptr<logger_iface> tacopie::active_logger |
variable containing the current logger by default, not set (no logs)