public void stop ()

Stops the service, i.

e. stops accepting connections from the added sockets when the mainloop runs.

This call is thread-safe, so it may be called from a thread handling an incoming client request.

Note that this only stops accepting new connections; it does not close the listening sockets, and you can call start again later to begin listening again. To close the listening sockets, call close. (This will happen automatically when the SocketService is finalized.)

This must be called before calling close as the socket service will start accepting connections immediately when a new socket is added.



a SocketService