public class TelnetServerSocket
extends java.net.ServerSocket
Constructor and Description |
---|
TelnetServerSocket()
Creates an unbound server socket.
|
TelnetServerSocket(int port)
Creates a server socket, bound to the specified port.
|
TelnetServerSocket(int port,
int backlog)
Creates a server socket and binds it to the specified local port
number, with the specified backlog.
|
TelnetServerSocket(int port,
int backlog,
java.net.InetAddress bindAddr)
Create a server with the specified port, listen backlog, and local IP
address to bind to.
|
Modifier and Type | Method and Description |
---|---|
java.net.Socket |
accept()
Listens for a connection to be made to this socket and accepts it.
|
bind, bind, close, getChannel, getInetAddress, getLocalPort, getLocalSocketAddress, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout, toString
public TelnetServerSocket() throws java.io.IOException
java.io.IOException
- if an I/O error occurspublic TelnetServerSocket(int port) throws java.io.IOException
port
- the port number, or 0 to use a port number that is
automatically allocated.java.io.IOException
- if an I/O error occurspublic TelnetServerSocket(int port, int backlog) throws java.io.IOException
port
- the port number, or 0 to use a port number that is
automatically allocated.backlog
- requested maximum length of the queue of incoming
connections.java.io.IOException
- if an I/O error occurspublic TelnetServerSocket(int port, int backlog, java.net.InetAddress bindAddr) throws java.io.IOException
port
- the port number, or 0 to use a port number that is
automatically allocated.backlog
- requested maximum length of the queue of incoming
connections.bindAddr
- the local InetAddress the server will bind tojava.io.IOException
- if an I/O error occurspublic java.net.Socket accept() throws java.io.IOException
accept
in class java.net.ServerSocket
java.io.IOException
- if an I/O error occursCopyright © 2019 Kevin Lamonte. Licensed MIT.