From 6232d13f5321b87ddf12a1aa36b4545da45f173d Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Wed, 17 Nov 2021 22:34:57 +0100 Subject: Travel3: Simple image and video display site Reads the images and videos from filesystem and builds a site in memroy. --- src/inet.hh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/inet.hh (limited to 'src/inet.hh') diff --git a/src/inet.hh b/src/inet.hh new file mode 100644 index 0000000..1575a17 --- /dev/null +++ b/src/inet.hh @@ -0,0 +1,29 @@ +#ifndef INET_HH +#define INET_HH + +#include "unique_fd.hh" + +#include +#include +#include + +class Logger; + +namespace inet { + +unique_fd accept(Logger* logger, int fd, bool make_nonblock = false); + +bool bind_and_listen(Logger* logger, + std::string const& addr, + std::string const& port, + std::vector* out); + +} // namespace inet + +namespace unix { + +unique_fd bind_and_listen(Logger* logger, std::string_view path); + +} // namespace unix + +#endif // INET_HH -- cgit v1.2.3-70-g09d2