Crosstales.OnlineCheck.Tool.PingCheck.PingCheck Class Reference

Checks the Ping to an Internet address. More...

Inheritance diagram for Crosstales.OnlineCheck.Tool.PingCheck.PingCheck:
Crosstales.Common.Util.Singleton< PingCheck >

Public Member Functions

delegate void PingCompleted (string host, string ip, float time, bool didTimeOut)
 Callback to determine whether the Ping-call has completed. More...
 
void Ping ()
 Checks the ping with the 'HostName'-variable. More...
 
void Ping (string hostname)
 Checks the ping with the given host name. More...
 

Public Attributes

PingCompleteEvent OnPingComplete
 
float LastPingTime => LastPingTimeMilliseconds / 1000f
 Returns the last ping time in seconds. More...
 
bool isPlatformSupported => !Crosstales.OnlineCheck.Util.Helper.isWebPlatform
 Indicates if PingCheck is supporting the current platform. More...
 

Protected Member Functions

override void Awake ()
 
- Protected Member Functions inherited from Crosstales.Common.Util.Singleton< PingCheck >
virtual void OnDestroy ()
 
virtual void OnApplicationQuit ()
 

Properties

string HostName [get, set]
 Hostname or IP for the Ping. More...
 
float Timeout [get, set]
 Timeout for the Ping in seconds (default: 3, range: 1 - 10). More...
 
bool RunOnStart [get, set]
 Start at runtime. More...
 
string LastHost [get]
 Returns the last host. More...
 
string LastIP [get]
 Returns the last IP. More...
 
int LastPingTimeMilliseconds [get]
 Returns the last ping time in milliseconds. More...
 
bool isBusy [get]
 Returns true if SpeedTest is busy. More...
 
- Properties inherited from Crosstales.Common.Util.Singleton< PingCheck >
static T Instance [get, protected set]
 Returns the singleton instance of this class. More...
 
bool DontDestroy [get, set]
 Don't destroy gameobject during scene switches. More...
 

Events

PingCompleted OnPingCompleted
 An event triggered whenever the Ping-call has completed. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Crosstales.Common.Util.Singleton< PingCheck >
static void CreateInstance (bool searchExistingGameObject=true, bool deleteExistingInstance=false)
 Creates an instance of this object. More...
 
static void DeleteInstance ()
 Deletes the instance of this object. More...
 
- Static Public Attributes inherited from Crosstales.Common.Util.Singleton< PingCheck >
static string PrefabPath
 Fully qualified prefab path. More...
 
static string GameObjectName
 Name of the gameobject in the scene. More...
 
- Static Protected Attributes inherited from Crosstales.Common.Util.Singleton< PingCheck >
static T instance
 

Detailed Description

Checks the Ping to an Internet address.

Member Function Documentation

◆ Ping() [1/2]

void Crosstales.OnlineCheck.Tool.PingCheck.PingCheck.Ping ( )

Checks the ping with the 'HostName'-variable.

◆ Ping() [2/2]

void Crosstales.OnlineCheck.Tool.PingCheck.PingCheck.Ping ( string  hostname)

Checks the ping with the given host name.

Parameters
hostnameHost name or IP for the ping

◆ PingCompleted()

delegate void Crosstales.OnlineCheck.Tool.PingCheck.PingCheck.PingCompleted ( string  host,
string  ip,
float  time,
bool  didTimeOut 
)

Callback to determine whether the Ping-call has completed.

Member Data Documentation

◆ isPlatformSupported

bool Crosstales.OnlineCheck.Tool.PingCheck.PingCheck.isPlatformSupported => !Crosstales.OnlineCheck.Util.Helper.isWebPlatform

Indicates if PingCheck is supporting the current platform.

Returns
True if PingCheck supports current platform.

◆ LastPingTime

float Crosstales.OnlineCheck.Tool.PingCheck.PingCheck.LastPingTime => LastPingTimeMilliseconds / 1000f

Returns the last ping time in seconds.

Returns
Last ping time in seconds.

Property Documentation

◆ HostName

string Crosstales.OnlineCheck.Tool.PingCheck.PingCheck.HostName
getset

Hostname or IP for the Ping.

◆ isBusy

bool Crosstales.OnlineCheck.Tool.PingCheck.PingCheck.isBusy
get

Returns true if SpeedTest is busy.

Returns
True if if SpeedTest is busy.

◆ LastHost

string Crosstales.OnlineCheck.Tool.PingCheck.PingCheck.LastHost
get

Returns the last host.

Returns
Last host.

◆ LastIP

string Crosstales.OnlineCheck.Tool.PingCheck.PingCheck.LastIP
get

Returns the last IP.

Returns
Last IP.

◆ LastPingTimeMilliseconds

int Crosstales.OnlineCheck.Tool.PingCheck.PingCheck.LastPingTimeMilliseconds
get

Returns the last ping time in milliseconds.

Returns
Last ping time in milliseconds.

◆ RunOnStart

bool Crosstales.OnlineCheck.Tool.PingCheck.PingCheck.RunOnStart
getset

Start at runtime.

◆ Timeout

float Crosstales.OnlineCheck.Tool.PingCheck.PingCheck.Timeout
getset

Timeout for the Ping in seconds (default: 3, range: 1 - 10).

Event Documentation

◆ OnPingCompleted

PingCompleted Crosstales.OnlineCheck.Tool.PingCheck.PingCheck.OnPingCompleted

An event triggered whenever the Ping-call has completed.


The documentation for this class was generated from the following file:
  • C:/Users/slaub/Unity/assets/OnlineCheck/OnlineCheckPro/Assets/Plugins/crosstales/OnlineCheck/Extras/PingCheck/Scripts/PingCheck.cs