SharpTox.Dns.ToxDns.ToxDns C# (CSharp) Method

ToxDns() public method

Initializes a new instance of tox dns3.
public ToxDns ( ToxKey publicKey ) : System
publicKey SharpTox.Core.ToxKey The public key that this instance of toxdns should be initialized with.
return System
        public ToxDns(ToxKey publicKey)
        {
            _toxDns3 = ToxDnsFunctions.New(publicKey.GetBytes());

            if (_toxDns3 == null || _toxDns3.IsInvalid)
                throw new Exception("Could not create a new tox_dns3 instance with the provided publicKey");
        }