java.net
Class DatagramSocket
java.lang.Object
|
+--java.net.DatagramSocket
- Direct Known Subclasses:
- MulticastSocket
- public synchronized class DatagramSocket
- extends Object
DatagramSocket
public DatagramSocket()
throws SocketException
DatagramSocket
protected DatagramSocket(DatagramSocketImpl)
DatagramSocket
public DatagramSocket(SocketAddress)
throws SocketException
DatagramSocket
public DatagramSocket(int)
throws SocketException
DatagramSocket
public DatagramSocket(int,
InetAddress)
throws SocketException
bind
public void bind(SocketAddress)
throws SocketException
SocketException
connect
public void connect(InetAddress,
int)
connect
public void connect(SocketAddress)
throws SocketException
SocketException
disconnect
public void disconnect()
isBound
public boolean isBound()
isConnected
public boolean isConnected()
getInetAddress
public InetAddress getInetAddress()
getPort
public int getPort()
getRemoteSocketAddress
public SocketAddress getRemoteSocketAddress()
getLocalSocketAddress
public SocketAddress getLocalSocketAddress()
send
public void send(DatagramPacket)
throws IOException
IOException
receive
public void receive(DatagramPacket)
throws IOException
IOException
getLocalAddress
public InetAddress getLocalAddress()
getLocalPort
public int getLocalPort()
setSoTimeout
public void setSoTimeout(int)
throws SocketException
SocketException
getSoTimeout
public int getSoTimeout()
throws SocketException
SocketException
setSendBufferSize
public void setSendBufferSize(int)
throws SocketException
SocketException
getSendBufferSize
public int getSendBufferSize()
throws SocketException
SocketException
setReceiveBufferSize
public void setReceiveBufferSize(int)
throws SocketException
SocketException
getReceiveBufferSize
public int getReceiveBufferSize()
throws SocketException
SocketException
setReuseAddress
public void setReuseAddress(boolean)
throws SocketException
SocketException
getReuseAddress
public boolean getReuseAddress()
throws SocketException
SocketException
setBroadcast
public void setBroadcast(boolean)
throws SocketException
SocketException
getBroadcast
public boolean getBroadcast()
throws SocketException
SocketException
setTrafficClass
public void setTrafficClass(int)
throws SocketException
SocketException
getTrafficClass
public int getTrafficClass()
throws SocketException
SocketException
close
public void close()
isClosed
public boolean isClosed()
getChannel
public java.nio.channels.DatagramChannel getChannel()
setDatagramSocketImplFactory
public static void setDatagramSocketImplFactory(DatagramSocketImplFactory)
throws IOException
IOException