Archived
1
0
This repository has been archived on 2023-08-12. You can view files and clone it, but cannot push or open issues or pull requests.
nntpchan/contrib/backends/nntpchan-daemon/include/nntpchan/net.hpp
Jeff Becker 720aeee7ee
more
2018-05-06 10:14:52 -04:00

25 lines
419 B
C++

#ifndef NNTPCHAN_NET_HPP
#define NNTPCHAN_NET_HPP
#include <netinet/in.h>
#include <string>
#include <sys/types.h>
#include <sys/socket.h>
namespace nntpchan
{
struct NetAddr
{
NetAddr();
sockaddr_in6 addr;
operator sockaddr *() { return (sockaddr *)&addr; }
operator const sockaddr *() const { return (sockaddr *)&addr; }
std::string to_string();
};
NetAddr ParseAddr(const std::string &addr);
}
#endif