diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2025-02-20 22:54:56 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2025-02-20 22:54:56 +0100 |
| commit | b4d6df902253637f24647d3db2bc3781d69eec1c (patch) | |
| tree | d8bf9ac04a270fabdfee1c15628c702471ef8bf5 /src/net.hh | |
| parent | 441cafc7124f633e5abc684e85a11ce3c991f6ae (diff) | |
Diffstat (limited to 'src/net.hh')
| -rw-r--r-- | src/net.hh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/net.hh b/src/net.hh new file mode 100644 index 0000000..918bde9 --- /dev/null +++ b/src/net.hh @@ -0,0 +1,22 @@ +#ifndef NET_HH +#define NET_HH + +#include <cstdint> +#include <string> +#include <vector> + +#include "logger.hh" +#include "unique_fd.hh" + +namespace net { + +std::vector<unique_fd> bind_and_listen( + Logger* logger, std::string const& host, uint16_t port); + +unique_fd connect(Logger* logger, std::string const& host, uint16_t port); + +unique_fd accept(Logger* logger, int fd); + +} // namespace net + +#endif // NET_HH |
