public class JnaIcmpMessenger extends Object implements Messenger<JnaPingRequest,JnaPingReply>, PingReplyListener
| Constructor and Description |
|---|
JnaIcmpMessenger(int pingerId) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isV4Available() |
boolean |
isV6Available() |
void |
onPingReply(InetAddress address,
EchoPacket packet) |
void |
sendRequest(JnaPingRequest request)
Send a message using the messenger service
|
void |
setAllowFragmentation(boolean allow) |
void |
setTrafficClass(int tc) |
void |
start(ReplyHandler<JnaPingReply> callback)
Start listening for replies and call the reply handler with any replies received.
|
public boolean isV4Available()
public boolean isV6Available()
public void sendRequest(JnaPingRequest request)
MessengersendRequest in interface Messenger<JnaPingRequest,JnaPingReply>public void start(ReplyHandler<JnaPingReply> callback)
Messengerstart in interface Messenger<JnaPingRequest,JnaPingReply>public void onPingReply(InetAddress address, EchoPacket packet)
onPingReply in interface PingReplyListenerpublic void setTrafficClass(int tc)
throws IOException
IOExceptionpublic void setAllowFragmentation(boolean allow)
throws IOException
IOExceptionCopyright © 2022. All rights reserved.