package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gio/Ocgtk_gio/Gio/Wrappers/Socket_service/index.html
Module Wrappers.Socket_service
type t = [ `socket_service | `socket_listener | `object_ ] Gobject.objval new_ : unit -> tCreate a new SocketService
val stop : t -> unitStops 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.
val start : t -> unitRestarts the service, i.e. start accepting connections from the added sockets when the mainloop runs. This only needs to be called after the service has been stopped from g_socket_service_stop().
This call is thread-safe, so it may be called from a thread handling an incoming client request.
val is_active : t -> boolCheck whether the service is active or not. An active service will accept new clients that connect, while a non-active service will let connecting clients queue up until the service is started.
val get_active : t -> boolGet property: active
val set_active : t -> bool -> unitSet property: active