From 17e22f10026068990595941eeb503fc2adb476a8 Mon Sep 17 00:00:00 2001 From: Claudius 'keldu' Holeksa Date: Thu, 17 Oct 2024 18:56:11 +0200 Subject: Changing impl things --- modules/io-tls/tls.hpp | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'modules/io-tls/tls.hpp') 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 { +template +class network> { +public: + virtual ~network() = default; + + /** + * Resolve the provided string and uint16 to the preferred storage method + */ + virtual conveyor>>> + 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>>> + parse_address(const std::string &addr, uint16_t port_hint = 0) = 0; + + /** + * Set up a listener on this address + */ + virtual error_or>> listen(network_address &bind_addr) = 0; + + /** + * Connect to a remote address + */ + virtual conveyor>> connect(network_address &address) = 0; }; template -- cgit v1.2.3