Package java.net
Class DatagramSocket
java.lang.Object
java.net.DatagramSocket
- Direct Known Subclasses:
MulticastSocket
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
connect
(InetAddress var0, int var1) void
int
int
getPort()
int
int
int
void
receive
(DatagramPacket var0) void
send
(DatagramPacket var0) static void
void
setReceiveBufferSize
(int var0) void
setSendBufferSize
(int var0) void
setSoTimeout
(int var0)
-
Constructor Details
-
DatagramSocket
- Throws:
SocketException
-
DatagramSocket
- Throws:
SocketException
-
DatagramSocket
- Throws:
SocketException
-
-
Method Details
-
close
public void close() -
connect
-
disconnect
public void disconnect() -
getInetAddress
-
getLocalAddress
-
getLocalPort
public int getLocalPort() -
getPort
public int getPort() -
getReceiveBufferSize
- Throws:
SocketException
-
getSendBufferSize
- Throws:
SocketException
-
getSoTimeout
- Throws:
SocketException
-
receive
- Throws:
IOException
-
send
- Throws:
IOException
-
setSendBufferSize
- Throws:
SocketException
-
setReceiveBufferSize
- Throws:
SocketException
-
setSoTimeout
- Throws:
SocketException
-
setDatagramSocketImplFactory
- Throws:
IOException
-