|
SNMP Stack 5_1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--uk.co.westhawk.snmp.net.KvmSocket
This is a wrapper class around the KVM DatagramConnection. This class is still under development.
| Field Summary |
| Fields inherited from interface uk.co.westhawk.snmp.net.ContextSocketFace |
version_id |
| Constructor Summary | |
KvmSocket()
|
|
| Method Summary | |
void |
close()
Closes this socket. |
void |
create(int port,
java.lang.String bindAddr)
Creates the socket. |
void |
create(java.lang.String host,
int port,
java.lang.String bindAddr)
Creates the socket. |
java.lang.String |
getLocalSocketAddress()
Returns the address of the endpoint this socket is bound to, or null if it is not bound yet. |
java.lang.String |
getReceivedFromHostAddress()
Returns the IP address of the (latest) host of the packet we received. |
java.lang.String |
getRemoteSocketAddress()
Returns the address of the endpoint this socket is connected to, or null if it is unconnected. |
java.lang.String |
getSendToHostAddress()
Returns the IP address of the host we sent the packet to. |
StreamPortItem |
receive(int maxRecvSize)
Receives a packet from this socket. |
void |
send(byte[] packet)
Sends a packet from this socket. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public KvmSocket()
| Method Detail |
public void create(int port,
java.lang.String bindAddr)
throws java.io.IOException
ContextSocketFace
create in interface ContextSocketFaceport - The local port number were we receive (listen for)
packetsbindAddr - The local address the server will bind to when
listening
java.io.IOExceptionContextSocketFace.create(String, int, String)
public void create(java.lang.String host,
int port,
java.lang.String bindAddr)
throws java.io.IOException
ContextSocketFace
create in interface ContextSocketFacehost - The name of the host that is to receive our packetsport - The port number of the hostbindAddr - The local address the server will bind to when
sending packets
java.io.IOExceptionContextSocketFace.create(int, String)public java.lang.String getSendToHostAddress()
ContextSocketFace
getSendToHostAddress in interface ContextSocketFaceContextSocketFace.getReceivedFromHostAddress()public java.lang.String getReceivedFromHostAddress()
ContextSocketFace
getReceivedFromHostAddress in interface ContextSocketFaceContextSocketFace.getSendToHostAddress()public java.lang.String getLocalSocketAddress()
ContextSocketFace
getLocalSocketAddress in interface ContextSocketFacepublic java.lang.String getRemoteSocketAddress()
ContextSocketFace
getRemoteSocketAddress in interface ContextSocketFace
public StreamPortItem receive(int maxRecvSize)
throws java.io.IOException
ContextSocketFace
receive in interface ContextSocketFacemaxRecvSize - the maximum number of bytes to receive
java.io.IOException
public void send(byte[] packet)
throws java.io.IOException
ContextSocketFace
send in interface ContextSocketFacepacket - the packet
java.io.IOExceptionpublic void close()
ContextSocketFace
close in interface ContextSocketFace
|
SNMP Stack 5_1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||