mirror of
https://gitlab.com/niansa/libcrosscoro.git
synced 2025-03-06 20:53:32 +01:00
25 lines
631 B
C++
25 lines
631 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
namespace coro::net
|
|
{
|
|
enum class connect_status
|
|
{
|
|
/// The connection has been established.
|
|
connected,
|
|
/// The given ip address could not be parsed or is invalid.
|
|
invalid_ip_address,
|
|
/// The connection operation timed out.
|
|
timeout,
|
|
/// There was an error, use errno to get more information on the specific error.
|
|
error
|
|
};
|
|
|
|
/**
|
|
* @param status String representation of the connection status.
|
|
* @throw std::logic_error If provided an invalid connect_status enum value.
|
|
*/
|
|
auto to_string(const connect_status& status) -> const std::string&;
|
|
|
|
} // namespace coro::net
|