A HTTP server.

By: Matej Lazar
See also newServer()

no type hierarchy

no supertypes hierarchy

no subtypes hierarchy

Inherited Attributes
Attributes inherited from: Object
hash, string
Methods
addEndpointshared formal void addEndpoint(HttpEndpoint endpoint)

Define endpoint by providing an Endpoint or AsynchronousEndpoint.

addListenershared formal void addListener(void listener(Status status))

Registers a status change listener. Listeners are called on status changes. Statuses are: starting, started, stopping, stopped.

addWebSocketEndpointshared formal void addWebSocketEndpoint(WebSocketBaseEndpoint endpoint)

Define an endpoint by providing a WebSocketEndpoint or WebSocketFragmentedEndpoint

startshared formal void start(SocketAddress socketAddress = ..., Options serverOptions = ...)

Start the server in the current thread.

Parameters:
  • socketAddress = SocketAddress("127.0.0.1", 8080)
  • serverOptions = Options()
startInBackgroundshared formal void startInBackground(SocketAddress socketAddress = ..., Options serverOptions = ...)

Start the server in a new thread.

Parameters:
  • socketAddress = SocketAddress("127.0.0.1", 8080)
  • serverOptions = Options()
stopshared formal void stop()

Stop the server.

Inherited Methods
Methods inherited from: Object
equals