Connection types of the Network module.
More...
|
| namespace | Read |
| | Read-side result codes.
|
| |
| namespace | Write |
| | Write-side result codes.
|
| |
Connection types of the Network module.
◆ HandlerType
Native socket handle (POSIX)
◆ Protocol
Address family for sockets.
| Enumerator |
|---|
| IPv4 | IPv4 (AF_INET)
|
| IPv6 | IPv6 (AF_INET6)
|
◆ Status
Lifecycle of a connection or listener.
| Enumerator |
|---|
| Connected | Connection established.
|
| Disconnected | Closed / idle.
|
| Connecting | Connect or listen in progress.
|
| Disconnecting | Shutdown in progress.
|
| Negotiating | Application-level handshake.
|
| Rejected | Peer or local rejection.
|
| PeerClosed | Peer closed the connection.
|
| Error | Error state.
|
◆ IsConnected()
| constexpr bool StormByte::Network::Connection::IsConnected |
( |
const Status & |
status | ) |
|
|
constexprnoexcept |
Whether the connection is usable for I/O (Connected or Negotiating).
- Parameters
-
- Returns
- true if usable.
◆ ProtocolInt()
| constexpr int StormByte::Network::Connection::ProtocolInt |
( |
const Protocol & |
protocol | ) |
|
|
constexprnoexcept |
Protocol as AF_* integer.
- Parameters
-
- Returns
- AF_INET or AF_INET6.
◆ ProtocolString()
| constexpr std::string StormByte::Network::Connection::ProtocolString |
( |
const Protocol & |
protocol | ) |
|
|
constexprnoexcept |
Protocol as text.
- Parameters
-
- Returns
- "IPv4", "IPv6", or "Unknown".
◆ StatusToString()
| constexpr std::string StormByte::Network::Connection::StatusToString |
( |
const Status & |
status | ) |
|
|
constexpr |
Status as text.
- Parameters
-
- Returns
- Human-readable name.
◆ ToString() [1/2]
Read result as text.
- Parameters
-
- Returns
- Human-readable name.
◆ ToString() [2/2]
Write result as text.
- Parameters
-
- Returns
- Human-readable name.