org.apache.commons.net
Class DefaultDatagramSocketFactory
java.lang.Objectorg.apache.commons.net.DefaultDatagramSocketFactory
- DatagramSocketFactory
public class DefaultDatagramSocketFactory
extends java.lang.Object
implements DatagramSocketFactory
DefaultDatagramSocketFactory implements the DatagramSocketFactory
interface by simply wrapping the java.net.DatagramSocket
constructors. It is the default DatagramSocketFactory used by
DatagramSocketClient
implementations.
DatagramSocketFactory, DatagramSocketClient, DatagramSocketClient.setDatagramSocketFactory
DatagramSocket | createDatagramSocket()-
Creates a DatagramSocket on the local host at the first available port.
|
DatagramSocket | createDatagramSocket(int port)-
Creates a DatagramSocket on the local host at a specified port.
|
DatagramSocket | createDatagramSocket(int port, InetAddress laddr)-
Creates a DatagramSocket at the specified address on the local host
at a specified port.
|
createDatagramSocket
public DatagramSocket createDatagramSocket()
throws SocketException
Creates a DatagramSocket on the local host at the first available port.
createDatagramSocket
public DatagramSocket createDatagramSocket(int port)
throws SocketException
Creates a DatagramSocket on the local host at a specified port.
port - The port to use for the socket.
createDatagramSocket
public DatagramSocket createDatagramSocket(int port,
InetAddress laddr)
throws SocketException
Creates a DatagramSocket at the specified address on the local host
at a specified port.
port - The port to use for the socket.laddr - The local address to use.