mirror of https://github.com/oxen-io/lokinet
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
547 B
C++
22 lines
547 B
C++
#pragma once
|
|
|
|
#include <string_view>
|
|
#include <string>
|
|
|
|
namespace llarp
|
|
{
|
|
/// A simple SockAddr wrapper which provides a sockaddr_in (IPv4). Memory management is handled
|
|
/// in constructor and destructor (if needed) and copying is disabled.
|
|
///
|
|
/// This is immutable.
|
|
struct SockAddr
|
|
{
|
|
sockaddr_in _addr4;
|
|
|
|
SockAddr(uint8_t a, uint8_t b, uint8_t c, uint8_t d);
|
|
SockAddr(uint8_t a, uint8_t b, uint8_t c, uint8_t d, uint16_t port);
|
|
SockAddr(uint32_t addr);
|
|
SockAddr(std::string_view addr);
|
|
};
|
|
} // namespace llarp
|