1#pragma once 2 3#include <cstring> 4#include <string> 5#include <string_view> 6 7namespace fd_util { 8 9// Returns true if the fd became ready, false if it didn't or 10// if there was another error. 11bool WaitUntilReady(int fd, double timeout, bool for_write = false); 12 13void SetNonBlocking(int fd, bool non_blocking); 14 15std::string GetLocalIP(int sock); 16 17} // fd_util 18 19