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)
Messenger
sendRequest
in interface Messenger<JnaPingRequest,JnaPingReply>
public void start(ReplyHandler<JnaPingReply> callback)
Messenger
start
in interface Messenger<JnaPingRequest,JnaPingReply>
public void onPingReply(InetAddress address, EchoPacket packet)
onPingReply
in interface PingReplyListener
public void setTrafficClass(int tc) throws IOException
IOException
public void setAllowFragmentation(boolean allow) throws IOException
IOException
Copyright © 2022. All rights reserved.