MayaFlux
1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
Address.hpp
Go to the documentation of this file.
1
#pragma once
2
3
namespace
Lila
{
4
5
/**
6
* @struct TcpAddress
7
* @brief A TCP host and port.
8
*
9
* The host is loopback by default, so only this machine can connect. Use
10
* "0.0.0.0" to accept other machines. There is no authentication: anyone who
11
* can connect can run code.
12
*/
13
struct
TcpAddress
{
14
std::string
host
{
"127.0.0.1"
};
15
int
port
{ 9090 };
16
};
17
18
/**
19
* @struct UnixAddress
20
* @brief A Unix domain socket: a socket file that only its owner can use.
21
*
22
* path is where the socket file goes. When empty, the default socket in the
23
* user's runtime directory is used.
24
*/
25
struct
UnixAddress
{
26
std::optional<std::filesystem::path>
path
;
27
};
28
29
/**
30
* @brief Where a Lila listens. A Lila listens at one address at most.
31
*/
32
using
Address
= std::variant<TcpAddress, UnixAddress>;
33
34
}
// namespace Lila
Lila::Address
std::variant< TcpAddress, UnixAddress > Address
Where a Lila listens.
Definition
Address.hpp:32
Lila
Definition
Address.hpp:3
Lila::TcpAddress::host
std::string host
Definition
Address.hpp:14
Lila::TcpAddress::port
int port
Definition
Address.hpp:15
Lila::TcpAddress
A TCP host and port.
Definition
Address.hpp:13
Lila::UnixAddress::path
std::optional< std::filesystem::path > path
Definition
Address.hpp:26
Lila::UnixAddress
A Unix domain socket: a socket file that only its owner can use.
Definition
Address.hpp:25
src
Lila
Address.hpp
Generated by
1.15.0