Click or drag to resize

Transmitter5Ping Method

Verifies that the SwissDec Web Service is reachable, as required by test-case UC010. This method transmits the "Hello, World!" string to the server, using clear text transmission (no digital signature and no encryption).

Namespace: SwissDecTX
Assembly: SwissDecTX.Transmitter5 (in SwissDecTX.Transmitter5.dll) Version: 5.0.0.0 (5.0.0.0)
Syntax
public void Ping(
	string appVersion,
	string monitoringID,
	out DateTime serverTime
)

Parameters

appVersion  String
UserAgent/Version as it appears in your declarations.
monitoringID  String
Your monitoring ID. Contact SwissDec to obtain your own private monitoring ID. You can use "monitoringID" or "tester" as a generic ID of you don't have your own yet.
serverTime  DateTime
Contains the server's time upon return from the call.
Remarks
This method will throw an exception in case an error occurs, or if the echoed string does not match the sent string.
Example
Calling Transmitter.Ping()
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter5();

           DateTime serverTime;
           tx.Ping(appVersion, monitoringID, out serverTime);

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also