Method

GioSocketServicestop

since: 2.22

Declaration [src]

void
g_socket_service_stop (
  GSocketService* service
)

Description [src]

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 g_socket_service_start() again later to begin listening again. To close the listening sockets, call g_socket_listener_close(). (This will happen automatically when the GSocketService is finalized.)

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

Available since: 2.22