public ToxOptions() { var err = ToxErrorOptionsNew.Ok; try { this.options = ToxFunctions.Options.New(ref err); } catch (DllNotFoundException) { throw new InvalidOperationException($"The underlying {Extern.DLL} was not found. Make sure it's the same folder as the executing binary."); } if (err != ToxErrorOptionsNew.Ok) { throw new InvalidOperationException(); } }
public static extern void SetIpv6Enabled(ToxOptionsHandle options, Boolean ipv6_enabled);
public static extern void Default(ToxOptionsHandle options);
public static extern UInt16 GetStartPort(ToxOptionsHandle options);
public static extern UInt16 GetProxyPort(ToxOptionsHandle options);
public static extern String GetProxyHost(ToxOptionsHandle options);
public static extern ToxProxyType GetProxyType(ToxOptionsHandle options);
public static extern Boolean GetLocalDiscoveryEnabled(ToxOptionsHandle options);
public static extern void SetSavedataType(ToxOptionsHandle options, ToxSavedataType type);
public static extern ToxSavedataType GetSavedataType(ToxOptionsHandle options);
public static extern void SetHolePunchingEnabled(ToxOptionsHandle options, Boolean hole_punching_enabled);
public static extern Boolean GetHolePunchingEnabled(ToxOptionsHandle options);
public static extern void SetTcpPort(ToxOptionsHandle options, UInt16 tcp_port);
public static extern void SetEndPort(ToxOptionsHandle options, UInt16 end_port);
public static extern void SetStartPort(ToxOptionsHandle options, UInt16 start_port);
public static extern Boolean GetUdpEnabled(ToxOptionsHandle options);
public static extern void SetUdpEnabled(ToxOptionsHandle options, Boolean udp_enabled);
public static extern IntPtr GetSavedataData(ToxOptionsHandle options);
public static extern void SetLocalDiscoveryEnabled(ToxOptionsHandle options, Boolean local_discovery_enabled);
public static extern void SetSavedataData(ToxOptionsHandle options, IntPtr data, SizeT length);
public static extern void SetProxyType(ToxOptionsHandle options, ToxProxyType proxy_type);
public static extern SizeT GetSavedataLength(ToxOptionsHandle options);
public static extern void SetProxyHost(ToxOptionsHandle options, [In, MarshalAs(UnmanagedType.LPStr)] String proxy_host);
public static extern void SetSavedataLength(ToxOptionsHandle options, SizeT length);
public static extern ToxHandle New(ToxOptionsHandle options, ref ToxErrorNew error);
public static extern void SetProxyPort(ToxOptionsHandle options, UInt16 proxy_port);