The class representing the connection information.
More...
#include <info.hxx>
|
| Info (const Info &other) noexcept=delete |
| The copy constructor of the Info class.
|
|
| Info (Info &&other) noexcept=default |
| The move constructor of the Info class.
|
|
| ~Info () noexcept=default |
| The destructor of the Info class.
|
|
Info & | operator= (const Info &other) noexcept=delete |
| The assignment operator of the Info class.
|
|
Info & | operator= (Info &&other) noexcept=default |
| The move assignment operator of the Info class.
|
|
constexpr const std::string & | IP () const noexcept |
| The function to get the IP address.
|
|
constexpr const unsigned short & | Port () const noexcept |
| The function to get the port.
|
|
std::shared_ptr< const sockaddr > | SockAddr () const noexcept |
| The function to get the socket address.
|
|
|
static StormByte::Expected< Info, Exception > | FromHost (const std::string &hostname, const unsigned short &port, const Protocol &protocol, std::shared_ptr< const Handler > handler) noexcept |
| The function to create a connection info from a host.
|
|
static StormByte::Expected< Info, Exception > | FromSockAddr (std::shared_ptr< sockaddr > sockaddr) noexcept |
| The function to create a connection info from a socket address.
|
|
The class representing the connection information.
◆ Info() [1/2]
StormByte::Network::Connection::Info::Info |
( |
const Info & |
other | ) |
|
|
deletenoexcept |
The copy constructor of the Info class.
- Parameters
-
other | The other Info to copy. |
◆ Info() [2/2]
StormByte::Network::Connection::Info::Info |
( |
Info && |
other | ) |
|
|
defaultnoexcept |
The move constructor of the Info class.
- Parameters
-
other | The other Info to move. |
◆ FromHost()
static StormByte::Expected< Info, Exception > StormByte::Network::Connection::Info::FromHost |
( |
const std::string & |
hostname, |
|
|
const unsigned short & |
port, |
|
|
const Protocol & |
protocol, |
|
|
std::shared_ptr< const Handler > |
handler |
|
) |
| |
|
staticnoexcept |
The function to create a connection info from a host.
- Parameters
-
hostname | The hostname of the connection. |
port | The port of the connection. |
protocol | The protocol of the connection. |
handler | The connection handler. |
- Returns
- The expected connection info or error.
◆ FromSockAddr()
static StormByte::Expected< Info, Exception > StormByte::Network::Connection::Info::FromSockAddr |
( |
std::shared_ptr< sockaddr > |
sockaddr | ) |
|
|
staticnoexcept |
The function to create a connection info from a socket address.
- Parameters
-
sockaddr | The socket address. |
- Returns
- The expected connection info or error.
◆ IP()
constexpr const std::string & StormByte::Network::Connection::Info::IP |
( |
| ) |
const |
|
inlineconstexprnoexcept |
The function to get the IP address.
- Returns
- The IP address.
◆ operator=() [1/2]
Info & StormByte::Network::Connection::Info::operator= |
( |
const Info & |
other | ) |
|
|
deletenoexcept |
The assignment operator of the Info class.
- Parameters
-
other | The other Info to assign. |
- Returns
- The reference to the assigned Info.
◆ operator=() [2/2]
Info & StormByte::Network::Connection::Info::operator= |
( |
Info && |
other | ) |
|
|
defaultnoexcept |
The move assignment operator of the Info class.
- Parameters
-
other | The other Info to assign. |
- Returns
- The reference to the assigned Info.
◆ Port()
constexpr const unsigned short & StormByte::Network::Connection::Info::Port |
( |
| ) |
const |
|
inlineconstexprnoexcept |
The function to get the port.
- Returns
- The port.
◆ SockAddr()
std::shared_ptr< const sockaddr > StormByte::Network::Connection::Info::SockAddr |
( |
| ) |
const |
|
inlinenoexcept |
The function to get the socket address.
- Returns
- The socket address.
The documentation for this class was generated from the following file:
- /home/runner/work/StormByte-Network/StormByte-Network/lib/public/StormByte/network/connection/info.hxx