diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2021-11-17 22:34:57 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2021-11-17 22:34:57 +0100 |
| commit | 6232d13f5321b87ddf12a1aa36b4545da45f173d (patch) | |
| tree | 23f3316470a14136debd9d02f9e920ca2b06f4cc /src/inet.hh | |
Travel3: Simple image and video display site
Reads the images and videos from filesystem and builds a site in
memroy.
Diffstat (limited to 'src/inet.hh')
| -rw-r--r-- | src/inet.hh | 29 |
1 files changed, 29 insertions, 0 deletions
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 <string> +#include <string_view> +#include <vector> + +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<unique_fd>* out); + +} // namespace inet + +namespace unix { + +unique_fd bind_and_listen(Logger* logger, std::string_view path); + +} // namespace unix + +#endif // INET_HH |
