|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrescuecore.LongUDPSocket
The LongUDPSocket class encapsulates the sending and receiving of LongUDPMessages to and from the kernal. Messages are received asynchronously and stored in a queue.
Constructor Summary | |
LongUDPSocket()
Generate a new LongUDPSocket |
Method Summary | |
void |
close()
Close the socket |
LongUDPMessage |
receive(int timeout)
Fetch a LongUDPMessage from the receive queue. |
void |
send(LongUDPMessage msg,
java.net.InetAddress destination,
int port)
Send a message |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LongUDPSocket() throws java.net.SocketException
Method Detail |
public void close()
public void send(LongUDPMessage msg, java.net.InetAddress destination, int port) throws java.io.IOException
msg
- The LongUDPMessage to senddestination
- The destination addressport
- The destination port
java.io.IOException
- if something goes wrong during sendingpublic LongUDPMessage receive(int timeout) throws java.io.IOException
timeout
- The maximum time to wait, in ms. If this is negative then this method will wait forever (or until interrupted).
java.io.IOException
- if there is an error during receiving
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |