summaryrefslogtreecommitdiff
path: root/forstio/io-tls/tls.h
diff options
context:
space:
mode:
Diffstat (limited to 'forstio/io-tls/tls.h')
-rw-r--r--forstio/io-tls/tls.h44
1 files changed, 21 insertions, 23 deletions
diff --git a/forstio/io-tls/tls.h b/forstio/io-tls/tls.h
index 8a31c1d..74b39ff 100644
--- a/forstio/io-tls/tls.h
+++ b/forstio/io-tls/tls.h
@@ -7,24 +7,24 @@
#include <variant>
namespace saw {
-class Tls;
+class tls;
-class TlsServer final : public server {
+class tls_server final : public server {
private:
own<server> internal;
public:
- TlsServer(own<server> srv);
+ tls_server(own<server> srv);
conveyor<own<io_stream>> accept() override;
};
-class TlsNetwork final : public network {
+class tls_network final : public network {
private:
- Tls& tls;
+ tls& tls_;
network &internal;
public:
- TlsNetwork(Tls& tls_, network &network_);
+ tls_network(tls& tls_, network &network_);
conveyor<own<network_address>> resolve_address(const std::string &addr, uint16_t port = 0) override;
@@ -36,35 +36,33 @@ public:
};
/**
-* Tls context class.
+* tls context class.
* Provides tls network class which ensures the usage of tls encrypted connections
*/
-class Tls {
+class tls {
private:
- class Impl;
- own<Impl> impl;
+ class impl;
+ own<impl> impl_;
public:
- Tls();
- ~Tls();
+ tls();
+ ~tls();
- struct Version {
- struct Tls_1_0{};
- struct Tls_1_1{};
- struct Tls_1_2{};
+ struct version {
+ struct tls_1_0{};
+ struct tls_1_1{};
+ struct tls_1_2{};
};
- struct Options {
+ struct options {
public:
- Version version;
+ version version;
};
- network& tlsNetwork();
-
- Impl &getImpl();
+ impl &get_impl();
private:
- Options options;
+ options options_;
};
-std::optional<own<TlsNetwork>> setupTlsNetwork(network &network);
+std::optional<own<tls_network>> setup_tls_network(network &network);
} // namespace saw