Package java.net
Class DatagramSocket
- java.lang.Object
-
- java.net.DatagramSocket
-
- Direct Known Subclasses:
MulticastSocket
public class DatagramSocket extends Object
-
-
Constructor Summary
Constructors Constructor Description DatagramSocket()DatagramSocket(int var0)DatagramSocket(int var0, InetAddress var1)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidconnect(InetAddress var0, int var1)voiddisconnect()InetAddressgetInetAddress()InetAddressgetLocalAddress()intgetLocalPort()intgetPort()intgetReceiveBufferSize()intgetSendBufferSize()intgetSoTimeout()voidreceive(DatagramPacket var0)voidsend(DatagramPacket var0)static voidsetDatagramSocketImplFactory(DatagramSocketImplFactory var0)voidsetReceiveBufferSize(int var0)voidsetSendBufferSize(int var0)voidsetSoTimeout(int var0)
-
-
-
Constructor Detail
-
DatagramSocket
public DatagramSocket() throws SocketException- Throws:
SocketException
-
DatagramSocket
public DatagramSocket(int var0) throws SocketException- Throws:
SocketException
-
DatagramSocket
public DatagramSocket(int var0, InetAddress var1) throws SocketException- Throws:
SocketException
-
-
Method Detail
-
close
public void close()
-
connect
public void connect(InetAddress var0, int var1)
-
disconnect
public void disconnect()
-
getInetAddress
public InetAddress getInetAddress()
-
getLocalAddress
public InetAddress getLocalAddress()
-
getLocalPort
public int getLocalPort()
-
getPort
public int getPort()
-
getReceiveBufferSize
public int getReceiveBufferSize() throws SocketException- Throws:
SocketException
-
getSendBufferSize
public int getSendBufferSize() throws SocketException- Throws:
SocketException
-
getSoTimeout
public int getSoTimeout() throws SocketException- Throws:
SocketException
-
receive
public void receive(DatagramPacket var0) throws IOException
- Throws:
IOException
-
send
public void send(DatagramPacket var0) throws IOException
- Throws:
IOException
-
setSendBufferSize
public void setSendBufferSize(int var0) throws SocketException- Throws:
SocketException
-
setReceiveBufferSize
public void setReceiveBufferSize(int var0) throws SocketException- Throws:
SocketException
-
setSoTimeout
public void setSoTimeout(int var0) throws SocketException- Throws:
SocketException
-
setDatagramSocketImplFactory
public static void setDatagramSocketImplFactory(DatagramSocketImplFactory var0) throws IOException
- Throws:
IOException
-
-