NET

NET_Ping replacement

View the Project on GitHub miyako/NET

version platform license downloads

NET

NET_Ping replacement

Usage

#DECLARE($params : Object)

If (Count parameters=0)
	
	CALL WORKER(1; Current method name; {})
	
Else 
	
	var $ping : cs.NET.ping
	$ping:=cs.NET.ping.new()
	
	//atomic
	$result:=$ping.ping({host: "us.4d.com"; timeout: 3; text: "Hello from 4D"})
	
	//async
	$ping.ping({host: "us.4d.com"; timeout: 3; text: "Hello from 4D"}; Formula(onResponse))
	
End if

Callback

#DECLARE($worker : 4D.SystemWorker; $params : Object)

var $result : Object

If ($worker.response="{@")
	$result:=JSON Parse($worker.response; Is object)
Else 
	$result:=Null
End if