Package com.oroinc.net
Class DefaultDatagramSocketFactory
java.lang.Object
com.oroinc.net.DefaultDatagramSocketFactory
- All Implemented Interfaces:
DatagramSocketFactory
DefaultDatagramSocketFactory implements the DatagramSocketFactory
interface by simply wrapping the java.net.DatagramSocket
constructors. It is the default DatagramSocketFactory used by
DatagramSocketClient implementations.
- Author:
- Daniel F. Savarese
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a DatagramSocket on the local host at the first available port.createDatagramSocket
(int port) Creates a DatagramSocket on the local host at a specified port.createDatagramSocket
(int port, InetAddress laddr) Creates a DatagramSocket at the specified address on the local host at a specified port.
-
Constructor Details
-
DefaultDatagramSocketFactory
public DefaultDatagramSocketFactory()
-
-
Method Details
-
createDatagramSocket
Creates a DatagramSocket on the local host at the first available port.- Specified by:
createDatagramSocket
in interfaceDatagramSocketFactory
- Throws:
SocketException
- If the socket could not be created.
-
createDatagramSocket
Creates a DatagramSocket on the local host at a specified port.- Specified by:
createDatagramSocket
in interfaceDatagramSocketFactory
- Parameters:
port
- The port to use for the socket.- Throws:
SocketException
- If the socket could not be created.
-
createDatagramSocket
Creates a DatagramSocket at the specified address on the local host at a specified port.- Specified by:
createDatagramSocket
in interfaceDatagramSocketFactory
- Parameters:
port
- The port to use for the socket.laddr
- The local address to use.- Throws:
SocketException
- If the socket could not be created.
-