public class SocketFactory
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
java.net.DatagramSocket |
createDatagramSocket()
Creates a datagram socket with the reuse flag set on a specific port.
|
java.net.DatagramSocket |
createDatagramSocket(int port)
Creates a datagram socket with the reuse flag set on a specific port.
|
java.net.MulticastSocket |
createMulticastSocket()
Creates a multicast socket with the reuse flag set.
|
java.net.MulticastSocket |
createMulticastSocket(int port)
Creates a multicast socket with the reuse flag set on a specific port.
|
static SocketFactory |
getSocketFactory()
Provides the current socket factory.
|
public static SocketFactory getSocketFactory()
public java.net.MulticastSocket createMulticastSocket()
throws java.io.IOException
java.io.IOException - thrown if the socket cannot be createdpublic java.net.MulticastSocket createMulticastSocket(int port)
throws java.io.IOException
port - the multicast socket portjava.io.IOException - thrown if the socket cannot be createdpublic java.net.DatagramSocket createDatagramSocket()
throws java.net.SocketException
java.net.SocketException - thrown if the socket cannot be createdpublic java.net.DatagramSocket createDatagramSocket(int port)
throws java.net.SocketException
port - the multicast socket portjava.net.SocketException - thrown if the socket cannot be created