-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathutility.hpp
More file actions
37 lines (28 loc) · 712 Bytes
/
utility.hpp
File metadata and controls
37 lines (28 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef _UTILITY_HPP
#define _UTILITY_HPP
#include <tuple>
#include <functional>
#include <cstring>
#include <fstream>
#include <iostream>
#include <string>
#include <sstream>
#include <any>
#include <map>
#include <unordered_map>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
namespace util {
template<typename... Types>
using pkg = std::tuple<Types...>;
template<typename... Types>
constexpr auto pack(Types&&... Args) { return std::make_tuple(Args...);}
namespace network {
struct sockaddr_in getSockAddr(std::string_view ip, uint16_t port);
}
namespace file {
int readFile(std::string_view filePath, std::string& buf);
}
}
#endif