Module: fathom/tools/ping

ping (udp/tcp/http) client/server implementation in using nspr API directly
Source:

Methods

(static) server_start(func, opt, incrementaloutput)

Start ping server.
Parameters:
Name Type Description
func function The callback function to invoke when results are available. First callback returns the server id.
opt object The command line arguments. Valid keys include: proto (default udp), port (default 5790).
incrementaloutput boolean Send incremental output (optional - default false).
Source:

(static) server_stop(id)

stop running ping server.
Parameters:
Name Type Description
id number The id returned by the start call.
Source:

(static) start(callback, dst, opt, incrementaloutput)

Start a ping client. The implementation runs a ping client in a ChromeWorker thread and reports results either incrementally or at completion. The implementation supports the following methods: - xmlhttpreq : Browser XmlHttpRequest HEAD request, no other payload. Works with any destination. - http : HTTP HEAD using Fathom tcp socket, no payload. Works with any destination. - ws : WebSocket based ping. Works only with the measurement server(s). - udp : UDP ping using Fathom sockets. Works between Fathom nodes and with the measurement server(s). - tcp : TCP ping using Fathom sockets. Works between Fathom nodes and with the measurement server(s).
Parameters:
Name Type Description
callback function The callback function to invoke when results are available.
dst string The host to ping.
opt object The command line arguments. Valid keys include: count (default 3), interval (default 1000ms), packetsize (default 56B), proto (xmlhttpreq, ws, http, udp - default), port (default 5790), timeout (default 10s).
incrementaloutput boolean Send incremental output (optional - default false).
Source: