public static class Ping.Pinger
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
dataOffset |
protected int |
identifier |
protected int |
length |
protected Ping.EchoReplyListener |
listener |
protected int |
offset |
protected byte[] |
recvData |
protected org.savarese.vserv.tcpip.ICMPEchoPacket |
recvPacket |
protected int |
replyType |
protected int |
requestType |
protected byte[] |
sendData |
protected org.savarese.vserv.tcpip.ICMPEchoPacket |
sendPacket |
protected int |
sequence |
protected RawSocket |
socket |
protected byte[] |
srcAddress |
| Modifier | Constructor and Description |
|---|---|
|
Ping.Pinger(int id) |
protected |
Ping.Pinger(int id,
int protocolFamily,
int protocol) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the raw socket opened by the constructor.
|
protected void |
computeSendChecksum(java.net.InetAddress host) |
int |
getRequestDataLength() |
int |
getRequestPacketLength() |
long |
ping(java.net.InetAddress host)
Issues a synchronous ping.
|
void |
receive() |
void |
receiveEchoReply() |
void |
sendEchoRequest(java.net.InetAddress host) |
void |
setEchoReplyListener(Ping.EchoReplyListener l) |
protected RawSocket socket
protected org.savarese.vserv.tcpip.ICMPEchoPacket sendPacket
protected org.savarese.vserv.tcpip.ICMPEchoPacket recvPacket
protected int offset
protected int length
protected int dataOffset
protected int requestType
protected int replyType
protected byte[] sendData
protected byte[] recvData
protected byte[] srcAddress
protected int sequence
protected int identifier
protected Ping.EchoReplyListener listener
protected Ping.Pinger(int id,
int protocolFamily,
int protocol)
throws java.io.IOException
java.io.IOExceptionpublic Ping.Pinger(int id)
throws java.io.IOException
java.io.IOExceptionprotected void computeSendChecksum(java.net.InetAddress host)
throws java.io.IOException
java.io.IOExceptionpublic void setEchoReplyListener(Ping.EchoReplyListener l)
public void close()
throws java.io.IOException
java.io.IOExceptionpublic void sendEchoRequest(java.net.InetAddress host)
throws java.io.IOException
java.io.IOExceptionpublic void receive()
throws java.io.IOException
java.io.IOExceptionpublic void receiveEchoReply()
throws java.io.IOException
java.io.IOExceptionpublic long ping(java.net.InetAddress host)
throws java.io.IOException
host - The host to ping.java.io.IOExceptionpublic int getRequestDataLength()
public int getRequestPacketLength()
Copyright © 2004-2007 Daniel F. Savarese
Copyright © 2009 Savarese Software Research Corporation. All Rights Reserved.