|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.net.DatagramSocket
The datagram socket class implements unreliable datagrams.
Constructor Summary | |
DatagramSocket()
Creates a datagram socket |
|
DatagramSocket(int port)
Creates a datagram socket |
Method Summary | |
void |
close()
Close the datagram socket. |
protected void |
finalize()
Code to perform when this object is garbage collected. |
int |
getLocalPort()
Returns the local port that this socket is bound to. |
void |
receive(DatagramPacket p)
Receives datagram packet. |
void |
send(DatagramPacket p)
Sends Datagram Packet to the destination address |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DatagramSocket() throws SocketException
public DatagramSocket(int port) throws SocketException
Method Detail |
public void send(DatagramPacket p) throws IOException
IOException
- i/o error occurredpublic void receive(DatagramPacket p) throws IOException
IOException
- i/o error occurredpublic int getLocalPort()
public void close()
protected void finalize()
Object
finalize
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |