NetworkProvider

Network access customization.

Constructors

Link copied to clipboard
constructor()
constructor(address: Long)

Properties

Link copied to clipboard

Address of native referenced object. nullptr if not referencing any native allocated object. Note native allocation will happen only once.

Functions

Link copied to clipboard
open fun connect(): Int

Request network connection. When the request execution finishes, the NetworkListener.onConnectFinished is called.

Link copied to clipboard
open fun connectionError(host: String)

Connection error notification Possible causes: network down, application doesn't permit to access the network

Link copied to clipboard
open fun disconnect(): Int

Disconnect the network if connected. No notification is provided.

Link copied to clipboard
fun finalize()

Overrides finalize that garbage collector will call when needed.

Link copied to clipboard
open fun getPublicIp(): String

Get public Ip from This information is useful when the SDK sends a connection exception debug info. If user considers this info as private he shouldn't implement this

Link copied to clipboard

True if keeps a reference to a C++ SDK object False if keeps a C++ SDK object

Link copied to clipboard
operator fun not(): Boolean

Checks if this object is valid.

Link copied to clipboard
fun release()

Releases the native referenced value of this object if:

Link copied to clipboard
open fun setListener(listener: INetworkListener?)

Sets the network listener.