net/serversocket.eh
Server sockets. More...
use "net/serversocket.eh" |
Constants
Types
Functions
Description
This header provides server sockets. A server socket waits for requests
to come in over the network. It performs some operation based on that request,
and then possibly returns a result to the requester.
Constant details
Specifies that connection port may be dynamically selected by platform.
Type details
A server socket.
Function details
Creates new server socket bound to the given port.
The constant
ANY_PORT may be used to indicate that connection port may be
provided automatically by platform. In the latter case the port can be discovered by
get_localport.
def ServerSocket.get_localhost(): String;
|
Returns the local host to which the socket is bound.
def ServerSocket.get_localport(): Int;
|
Returns the local port to which the socket is bound.
def ServerSocket.accept(): Socket;
|
Waits for incoming connection and then returns it.