diff options
author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-10-17 18:56:11 +0200 |
---|---|---|
committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-10-17 18:56:11 +0200 |
commit | 17e22f10026068990595941eeb503fc2adb476a8 (patch) | |
tree | b8e92692ae7a6dc770bd7d81aeb55869ce162a98 /modules/io-tls/tls.hpp | |
parent | b048b02732cbfcfbb95bb8e16dec71aca0e977f4 (diff) |
Changing impl things
Diffstat (limited to 'modules/io-tls/tls.hpp')
-rw-r--r-- | modules/io-tls/tls.hpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/modules/io-tls/tls.hpp b/modules/io-tls/tls.hpp index e2202f4..c5c3da1 100644 --- a/modules/io-tls/tls.hpp +++ b/modules/io-tls/tls.hpp @@ -42,8 +42,33 @@ private: options options_; }; -template<> -class network<net::Tls> { +template<typename T> +class network<net::Tls<T>> { +public: + virtual ~network() = default; + + /** + * Resolve the provided string and uint16 to the preferred storage method + */ + virtual conveyor<own<network_address<net::Tls<T>>>> + resolve_address(const std::string &addr, uint16_t port_hint = 0) = 0; + + /** + * Parse the provided string and uint16 to the preferred storage method + * Since no dns request is made here, no async conveyors have to be used. + */ + virtual error_or<own<network_address<net::Tls<T>>>> + parse_address(const std::string &addr, uint16_t port_hint = 0) = 0; + + /** + * Set up a listener on this address + */ + virtual error_or<own<server<T>>> listen(network_address<T> &bind_addr) = 0; + + /** + * Connect to a remote address + */ + virtual conveyor<own<io_stream<T>>> connect(network_address<T> &address) = 0; }; template<typename T = net::Os> |