Listener -
socket
: Listener
Represents the socket listener on which the socket listener service is registered and started.
Constructor
__init
(int port, ListenerConfig? config)
- port int
-
The port number of the remote service
- config ListenerConfig? ()
-
Configurations related to the
socket:Listener
Methods
Stops the socket:Listener
gracefully.
Stops the socket:Listener
forcefully.
Stops consuming messages and detaches the service from the socket:Listener
.
LifeCycle Methods
Methods
Stops the socket:Listener
gracefully.
socket:error? result = socketListener.__gracefulStop();
-
Return Type
(error?) ()
or else asocket:Error
upon failure to stop the listener
Stops the socket:Listener
forcefully.
socket:error? result = socketListener.__immediateStop();
-
Return Type
(error?) ()
or else asocket:Error
upon failure to stop the listener
Stops consuming messages and detaches the service from the socket:Listener
.
socket:error? result = socketListener.__detach(helloService);
Parameters
- s service
-
Type descriptor of the service
-
Return Type
(error?) ()
or else asocket:Error
upon failure to detach the service
LifeCycle Methods
Starts the socket:Listener
.
socket:error? result = socketListener.__start();
-
Return Type
(error?) ()
or else asocket:Error
upon failure to start the listener
Binds a service to the socket:Listener
.
socket:error? result = socketListener.__attach(helloService);
Parameters
- s service
-
Type descriptor of the service
- name string? (default ())
-
Name of the service
-
Return Type
(error?) ()
or else asocket:Error
upon failure to register the listener