示例#1
0
        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();
            }
        }
示例#2
0
 public static extern void SetIpv6Enabled(ToxOptionsHandle options, Boolean ipv6_enabled);
示例#3
0
 public static extern void Default(ToxOptionsHandle options);
示例#4
0
 public static extern UInt16 GetStartPort(ToxOptionsHandle options);
示例#5
0
 public static extern UInt16 GetProxyPort(ToxOptionsHandle options);
示例#6
0
 public static extern String GetProxyHost(ToxOptionsHandle options);
示例#7
0
 public static extern ToxProxyType GetProxyType(ToxOptionsHandle options);
示例#8
0
 public static extern Boolean GetLocalDiscoveryEnabled(ToxOptionsHandle options);
示例#9
0
 public static extern void SetSavedataType(ToxOptionsHandle options, ToxSavedataType type);
示例#10
0
 public static extern ToxSavedataType GetSavedataType(ToxOptionsHandle options);
示例#11
0
 public static extern void SetHolePunchingEnabled(ToxOptionsHandle options, Boolean hole_punching_enabled);
示例#12
0
 public static extern Boolean GetHolePunchingEnabled(ToxOptionsHandle options);
示例#13
0
 public static extern void SetTcpPort(ToxOptionsHandle options, UInt16 tcp_port);
示例#14
0
 public static extern void SetEndPort(ToxOptionsHandle options, UInt16 end_port);
示例#15
0
 public static extern void SetStartPort(ToxOptionsHandle options, UInt16 start_port);
示例#16
0
 public static extern Boolean GetUdpEnabled(ToxOptionsHandle options);
示例#17
0
 public static extern void SetUdpEnabled(ToxOptionsHandle options, Boolean udp_enabled);
示例#18
0
 public static extern IntPtr GetSavedataData(ToxOptionsHandle options);
示例#19
0
 public static extern void SetLocalDiscoveryEnabled(ToxOptionsHandle options, Boolean local_discovery_enabled);
示例#20
0
 public static extern void SetSavedataData(ToxOptionsHandle options, IntPtr data, SizeT length);
示例#21
0
 public static extern void SetProxyType(ToxOptionsHandle options, ToxProxyType proxy_type);
示例#22
0
 public static extern SizeT GetSavedataLength(ToxOptionsHandle options);
示例#23
0
 public static extern void SetProxyHost(ToxOptionsHandle options, [In, MarshalAs(UnmanagedType.LPStr)] String proxy_host);
示例#24
0
 public static extern void SetSavedataLength(ToxOptionsHandle options, SizeT length);
示例#25
0
 public static extern ToxHandle New(ToxOptionsHandle options, ref ToxErrorNew error);
示例#26
0
 public static extern void SetProxyPort(ToxOptionsHandle options, UInt16 proxy_port);