Options
Object Hierarchy:
Description:
[ Compact ]
public class Options
This class contains all the startup options for Tox.
Example: Create options and use in core
using ToxCore;
public static int main (string[] args) {
// Create the new option instance
ErrOptionsNew err_options;
var options = new Options(out err_options);
assert(err_options == ErrOptionsNew.OK);
// Set some options
options.ipv6_enabled = false;
options.udp_enabled = false;
// Initialize the tox instance with the options
ErrNew err_tox;
var tox = new Tox(options, out err_tox);
assert(err_tox == ErrNew.OK);
return 0;
}
Content:
Properties:
- public uint16 end_port { get; set; }
The end port of the inclusive port range to attempt to use.
- public bool hole_punching_enabled { get; set; }
Enables or disables UDP hole-punching in toxcore. (Default: enabled).
- public bool ipv6_enabled { get; set; }
The type of socket to create.
- public bool local_discovery_enabled { get; set; }
Enable local network peer discovery.
- public string? proxy_host { get; set; }
The IP address or DNS name of the proxy to be used.
- public uint16 proxy_port { get; set; }
The port to use to connect to the proxy server.
- public ProxyType proxy_type { get; set; }
Pass communications through a proxy.
- public SaveDataType savedata_type { get; set; }
The type of savedata to load from.
- public uint16 start_port { get; set; }
The start port of the inclusive port range to attempt to use.
- public uint16 tcp_port { get; set; }
The port to use for the TCP server (relay). If 0, the TCP server is
disabled.
- public bool udp_enabled { get; set; }
Enable the use of UDP communication when available.
Creation methods:
Methods:
Fields: