jnb-ping

Java Non-Blocking Ping (ICMP)

Лицензия

Лицензия

Группа

Группа

com.zaxxer
Идентификатор

Идентификатор

jnb-ping
Последняя версия

Последняя версия

1.3.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

jnb-ping
Java Non-Blocking Ping (ICMP)
Ссылка на сайт

Ссылка на сайт

https://github.com/brettwooldridge/jnb-ping
Система контроля версий

Система контроля версий

https://github.com/brettwooldridge/jnb-ping

Скачать jnb-ping

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.zaxxer/jnb-ping/ -->
<dependency>
    <groupId>com.zaxxer</groupId>
    <artifactId>jnb-ping</artifactId>
    <version>1.3.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.zaxxer/jnb-ping/
implementation 'com.zaxxer:jnb-ping:1.3.2'
// https://jarcasting.com/artifacts/com.zaxxer/jnb-ping/
implementation ("com.zaxxer:jnb-ping:1.3.2")
'com.zaxxer:jnb-ping:jar:1.3.2'
<dependency org="com.zaxxer" name="jnb-ping" rev="1.3.2">
  <artifact name="jnb-ping" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.zaxxer', module='jnb-ping', version='1.3.2')
)
libraryDependencies += "com.zaxxer" % "jnb-ping" % "1.3.2"
[com.zaxxer/jnb-ping "1.3.2"]

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
org.jetbrains.kotlin : kotlin-reflect jar 1.3.70
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.3.70
com.github.jnr : jnr-posix jar 3.0.52
it.unimi.dsi : fastutil jar 8.1.0

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

jnb-ping - Java Non-Blocking ICMP Ping

A non-blocking ICMP library for Java, using JNA to access native APIs, supporting thousands of simultaneous ICMP ping targets. Written in Kotlin, but compatible with Java (or any JVM-hosted language).

Currently, only Linux and MacOS X are supported.

Example:

class PingHandler : PingResponseHandler {
   override fun onResponse(pingTarget: PingTarget, responseTimeSec: Double, byteCount: Int, seq: Int) {
      System.out.printf("  ${Thread.currentThread()} $byteCount bytes from $pingTarget: icmp_seq=$seq time=%1.6f\n", responseTimeSec)
   }

   override fun onTimeout(pingTarget: PingTarget) {
      System.out.println("  ${Thread.currentThread()} Timeout $pingTarget")
   }
}

val pinger = IcmpPinger(PingHandler())
pinger.ping( PingTarget(InetAddress.getByName("8.8.8.8")) )
pinger.ping( PingTarget(InetAddress.getByName("youtube.com")) )

while (pinger.isPendingWork()) Thread.sleep(500)

pinger.stopSelector()

The minimum supported Linux kernel version is v4.19.10. It may work with older kernels (some reported working on v3.13.), depending on the kernel configuration parameters, but only v4.19.10+ has been tested. I am fairly certain that IPv6 is not supported (by this library) on any Linux kernel version less than v4.19.

Версии библиотеки

Версия
1.3.2
1.3.1
1.3.0
1.2.0
1.1.0
1.0.0
0.9.4
0.9.3
0.9.2
0.9.1