Package java.net
Class DatagramSocket
java.lang.Object
java.net.DatagramSocket
- Direct Known Subclasses:
MulticastSocket
-
Constructor Summary
ConstructorsModifierConstructorDescriptionDatagramSocket
(int var0) DatagramSocket
(int var0, InetAddress var1) protected
DatagramSocket
(SocketAddress var0) -
Method Summary
Modifier and TypeMethodDescriptionvoid
bind
(SocketAddress var0) void
close()
void
connect
(InetAddress var0, int var1) void
connect
(SocketAddress var0) void
boolean
int
int
getPort()
int
boolean
int
int
int
boolean
isBound()
boolean
isClosed()
boolean
void
receive
(DatagramPacket var0) void
send
(DatagramPacket var0) void
setBroadcast
(boolean var0) static void
void
setReceiveBufferSize
(int var0) void
setReuseAddress
(boolean var0) void
setSendBufferSize
(int var0) void
setSoTimeout
(int var0) void
setTrafficClass
(int var0)
-
Constructor Details
-
DatagramSocket
- Throws:
SocketException
-
DatagramSocket
- Throws:
SocketException
-
DatagramSocket
- Throws:
SocketException
-
DatagramSocket
-
DatagramSocket
- Throws:
SocketException
-
-
Method Details
-
bind
- Throws:
SocketException
-
close
public void close() -
connect
-
connect
- Throws:
SocketException
-
disconnect
public void disconnect() -
getBroadcast
- Throws:
SocketException
-
getInetAddress
-
getLocalAddress
-
getLocalPort
public int getLocalPort() -
getLocalSocketAddress
-
getPort
public int getPort() -
getReceiveBufferSize
- Throws:
SocketException
-
getRemoteSocketAddress
-
getReuseAddress
- Throws:
SocketException
-
getSendBufferSize
- Throws:
SocketException
-
getSoTimeout
- Throws:
SocketException
-
getTrafficClass
- Throws:
SocketException
-
isBound
public boolean isBound() -
isClosed
public boolean isClosed() -
isConnected
public boolean isConnected() -
receive
- Throws:
IOException
-
send
- Throws:
IOException
-
setBroadcast
- Throws:
SocketException
-
setDatagramSocketImplFactory
- Throws:
IOException
-
setReceiveBufferSize
- Throws:
SocketException
-
setReuseAddress
- Throws:
SocketException
-
setSendBufferSize
- Throws:
SocketException
-
setSoTimeout
- Throws:
SocketException
-
setTrafficClass
- Throws:
SocketException
-