Listener -
http
: Listener
This is used for creating HTTP server endpoints. An HTTP server endpoint is capable of responding to
remote callers. The Listener
is responsible for initializing the endpoint using the provided configurations.
Constructor
__init
(int port, ListenerConfiguration? config)
- port int
-
Listening port of the HTTP service listener
- config ListenerConfiguration? ()
Methods
Stops the service listener gracefully. Already-accepted requests will be served before connection closure.
Stops the service listener immediately. It is not implemented yet.
Detaches a Http or WebSocket service from the listener. Note that detaching a WebSocket service would not affect
The functionality of the existing connections.
Gets invoked during module initialization to initialize the endpoint.
LifeCycle Methods
Methods
Stops the service listener gracefully. Already-accepted requests will be served before connection closure.
-
Return Type
(error?) An
error
if an error occurred during the listener stopping process
Stops the service listener immediately. It is not implemented yet.
-
Return Type
(error?) An
error
if an error occurred during the listener stop process
Detaches a Http or WebSocket service from the listener. Note that detaching a WebSocket service would not affect
The functionality of the existing connections.
Parameters
- s service
-
The service to be detached
-
Return Type
(error?) An
error
if one occurred during detaching of a service or else()
Gets invoked during module initialization to initialize the endpoint.
Parameters
- c ListenerConfiguration
-
Configurations for HTTP service endpoints
LifeCycle Methods
Starts the registered service programmatically.
-
Return Type
(error?) An
error
if an error occurred during the listener starting process