//network_utils.h #ifndef MCPINGER_NETWORK_UTILS_H #define MCPINGER_NETWORK_UTILS_H #include #include #define SUCCESS 0 #define ERROR_RESOLVING_HOSTNAME (-2) #define ERROR_CONNECTION_FAILED (-3) #define ERROR_SENDING_DATA (-4) #define ERROR_RECEIVING_DATA (-5) int sendData(int sockfd, const std::vector &data); int receiveData(int sockfd, std::vector &buffer); std::string pingMinecraftServer(const std::string &hostname, int port, const std::string &virtualHostname, int virtualPort, int protocolVersionIn, int nextStateIn); #endif // MCPINGER_NETWORK_UTILS_H