public class ServerSocketFactory13 extends ServerSocketFactory
| Modifier and Type | Field and Description |
|---|---|
(package private) static ServerSocketFactory |
factory
The SocketFactory singleton for this class.
|
DefaultFactory, logger| Constructor and Description |
|---|
ServerSocketFactory13() |
| Modifier and Type | Method and Description |
|---|---|
ServerSocket |
createServerSocket(int port,
int backlog)
Creates a server socket and binds it to the specified local port number, with
the specified backlog.
|
ServerSocket |
createServerSocket(int port,
int backlog,
InetAddress addr)
Create a server with the specified port, listen backlog, and local IP address to
bind to.
|
static ServerSocketFactory |
getFactory()
Returns the ServerSocketFactory singleton for this class.
|
getDefaultFactory, getFactorystatic ServerSocketFactory factory
public static ServerSocketFactory getFactory()
public ServerSocket createServerSocket(int port, int backlog) throws IOException
createServerSocket in class ServerSocketFactoryport - the specified port, or 0 to use any free port.backlog - the maximum length of the queue, or 0 to use the default value.IOException - if an I/O error occurs when opening the socket.ServerSocket(int, int)public ServerSocket createServerSocket(int port, int backlog, InetAddress addr) throws IOException
The addr argument can be used on a multi-homed host for a ServerSocket that will only accept connect requests to one of its addresses. If addr is null, it will default accepting connections on any/all local addresses.
createServerSocket in class ServerSocketFactoryport - the local TCP port, it must be between 0 and 65535, inclusive.backlog - the maximum length of the queue, or 0 to use the default value.addr - the local InetAddress the server will bind to.IOException - if an I/O error occurs when opening the socket.ServerSocket(int, int, InetAddress)Copyright © 2022 ScalAgent D.T.. All rights reserved.