public static void RunDataPathValidation(WiFiDirectTestController localWFDController, WiFiDirectTestController remoteWFDController, string port = "5001") { // Close existing socket connections localWFDController.ResetDataPathTester(); remoteWFDController.ResetDataPathTester(); // Turn off the listen state on the remote device before working with sockets. remoteWFDController.ConfigureListenState(false); remoteWFDController.StartStreamSocketListener(port); localWFDController.ConnectStreamSocketAndSendGuid(port); remoteWFDController.WaitForSocketConnectionReceived(); // Wait for the connection received callback to complete so the DataPathTestGuid is properly initialized // Save GUID values to a local variable, to avoid having them change between the comparison and log prints below Guid localTestGuid = localWFDController.DataPathTestGuid; Guid remoteTestGuid = remoteWFDController.DataPathTestGuid; if (remoteTestGuid != localTestGuid) { WiFiDirectTestLogger.Error("Received GUID value of {0} did not match transmitted value of {1}", remoteTestGuid, localTestGuid); return; } WiFiDirectTestLogger.Log("Validated transmitted and received GUID values match."); }