public void Start() { //Registering receiver logger.LogDebug("Starting reader"); if (configuration.TestMulticast) { multicastClient.StartListening((s) => ProcessPongResponse(s, PingDiagnosticResponseChannel.Multicast)); } if (configuration.TestFirebase) { firebaseChannel.StartReceiving((s) => ProcessPongResponse(s, PingDiagnosticResponseChannel.Firebase)); } //Doing send logger.LogDebug($"Starting writer with sessionid: {sessionIdentifier}"); while (true) { var pingIdentifier = GenerateIdentifier(); logger.LogDebug($"Ping: {pingIdentifier}"); // Send the outgoing message var tripData = container.RegisterTripStart(sessionIdentifier, pingIdentifier); TransmitPing(tripData); HandleFinalizeOfPing(tripData, configuration.WaitMS); //Schedule the way for resolve thread //Sleep until sending the netxt ping. Thread.Sleep(configuration.IntervalMS); } }
public void StartTest() { logger.LogInformation("Start listening, press ctrl+c to terminate"); multicastClient.StartListening((r) => { logger.LogInformation($"Got data: {r}"); }); }