Added api_endpoint API call to give local API endpoint address, added responses to local-only UDP API, added Socket::getSocketName(), added ability to discover current listening interface address and port for serveSocket-style functions

This commit is contained in:
Thulinma 2020-07-15 19:29:16 +02:00
parent b45fd85b95
commit b057698018
5 changed files with 52 additions and 28 deletions

View file

@ -44,6 +44,7 @@ namespace Socket{
bool checkTrueSocket(int sock);
std::string resolveHostToBestExternalAddrGuess(const std::string &host, int family = AF_UNSPEC,
const std::string &hint = "");
bool getSocketName(int fd, std::string & host, uint32_t & port);
/// A buffer made out of std::string objects that can be efficiently read from and written to.
class Buffer{