32 lines
601 B
C++
32 lines
601 B
C++
#pragma once
|
|
|
|
#include <openssl/bio.h>
|
|
#include <openssl/err.h>
|
|
#include <openssl/ssl.h>
|
|
|
|
namespace Network {
|
|
|
|
struct Address {
|
|
Address();
|
|
Address(int type, gsl::czstring presentationAddr, std::uint16_t port);
|
|
|
|
void zeroFill();
|
|
void set(int type, gsl::czstring presentationAddr, std::uint16_t port);
|
|
void setType(int type);
|
|
|
|
operator std::string();
|
|
std::uint16_t getPort() const;
|
|
|
|
std::uint32_t family;
|
|
union {
|
|
struct sockaddr addr;
|
|
struct sockaddr_in addr_in;
|
|
struct sockaddr_in6 addr_in6;
|
|
};
|
|
socklen_t length;
|
|
|
|
BIO_ADDR* bio_addr_info;
|
|
};
|
|
|
|
} // namespace Chattr
|