OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ |
| 10 |
| 11 package com.google.media.networktester; |
| 12 |
| 13 public class NetworkTester extends Thread { |
| 14 private native static long CreateTestController(); |
| 15 private native static void TestControllerConnect(long testController); |
| 16 private native static void TestControllerRun(long testController); |
| 17 private native static boolean TestControllerIsDone(long testController); |
| 18 private native static void DestroyTestController(long testController); |
| 19 static { |
| 20 System.loadLibrary("network_tester_so"); |
| 21 } |
| 22 |
| 23 @Override |
| 24 public void run() { |
| 25 final long testController = CreateTestController(); |
| 26 TestControllerConnect(testController); |
| 27 while (!Thread.interrupted() && !TestControllerIsDone(testController)) { |
| 28 TestControllerRun(testController); |
| 29 } |
| 30 DestroyTestController(testController); |
| 31 } |
| 32 } |
OLD | NEW |