1
0
Fork 0
mirror of https://gitlab.com/niansa/libcrosscoro.git synced 2025-03-06 20:53:32 +01:00
libcrosscoro/inc/coro/net/connect.hpp
Josh Baldwin e1e52b1400
Add SSL/TLS support for TCP client/server via OpenSSL (#54)
* Add SSL/TLS support for TCP client/server via OpenSSL

* Comments addressed
2021-02-15 14:01:48 -07:00

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