Configuration

Read time 1 minute
On this page

Nalix loads its settings from an INI file via ConfigurationManager, and generates that file automatically the first time you run your project if it doesn’t exist yet.

using Nalix.SDK.Options;
using Nalix.Network.Options;
using Nalix.Environment.Configuration;

// Server
NetworkSocketOptions socket = ConfigurationManager.Instance.Get<NetworkSocketOptions>();
socket.Validate();

// Client
TransportOptions transport = ConfigurationManager.Instance.Get<TransportOptions>();

Full source: docs/installation.md covers the default server.ini layout and every option group.

Validate before you open sockets

Call Validate() on option types that expose it, before you start listening or connecting. A bad value caught at startup is far cheaper to debug than one discovered mid-traffic.

Common option groups

OptionPurpose
NetworkSocketOptionsBuffer sizes, ports, and IP properties
DispatchOptionsPer-connection queue bounds and drop policy
ConnectionGuardOptionsConnection ceiling, error thresholds, and progressive bans
TransportOptionsClient-side connect address, timeouts, and reconnect behavior

Next steps