ServerSocket
classin packageklyn.net
public class ServerSocket implements AutoClosable
ServerSocket
All Implemented Interfaces: AutoClosable

TCP server socket.

Properties
Modifier and Type Member Description
public readonly property isBound
isBound as Boolean
Returns true if the socket is currently bound.
public readonly property localPort
localPort as Int
Local listening port, including the actual port selected for a 0 bind.
public readonly property localSocketAddress
localSocketAddress as SocketAddress
Returns the local bound address.
Constructors
Modifier and Type Member Description
public ServerSocket
ServerSocket(port as Int) throws IOException
Creates a listening TCP socket.
Methods
Modifier and Type Member Description
public accept
accept() as Socket throws IOException
Accepts one client connection.
public bind
bind(port as Int, backlog as Int, host as String) as Void throws IOException
Binds and starts listening.
public override close
close() as Void throws IOException
Closes the listening socket.
Inherited Methods
methodInherited Methods from AutoClosable: close