ipv6 support

This commit is contained in:
Chunting Gu
2020-08-24 13:50:23 +08:00
parent 12e3569a83
commit c392b57a55
10 changed files with 44 additions and 17 deletions
+5 -2
View File
@@ -20,8 +20,8 @@ namespace webcc {
class Server : public Router {
public:
explicit Server(std::uint16_t port,
const std::filesystem::path& doc_root = {});
Server(asio::ip::tcp protocol, std::uint16_t port,
const std::filesystem::path& doc_root = {});
~Server() = default;
@@ -94,6 +94,9 @@ private:
ResponsePtr ServeStatic(RequestPtr request);
private:
// tcp::v4() or tcp::v6()
asio::ip::tcp protocol_;
// Port number.
std::uint16_t port_;