Hoogle Search
Within LTS Haskell 24.52 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
module GI.Gio.Objects.
ThreadedSocketService A GThreadedSocketService is a simple subclass of SocketService that handles incoming connections by creating a worker thread and dispatching the connection to it by emitting the signalgio.ThreadedSocketService[run signal] in the new thread. The signal handler may perform blocking I/O and need not return until the connection is closed. The service is implemented using a thread pool, so there is a limited amount of threads available to serve incoming requests. The service automatically stops the SocketService from accepting new connections when all threads are busy. As with SocketService, you may connect to ThreadedSocketService::run, or subclass and override the default handler. Since: 2.22
class (GObject o, IsDescendantOf ThreadedSocketService o) =>
IsThreadedSocketService ogi-gio GI.Gio.Objects.ThreadedSocketService Type class for types which can be safely cast to ThreadedSocketService, for instance with toThreadedSocketService.
-
gi-gio GI.Gio.Objects.ThreadedSocketService Memory-managed wrapper type.
ThreadedSocketService :: ManagedPtr ThreadedSocketService -> ThreadedSocketServicegi-gio GI.Gio.Objects.ThreadedSocketService No documentation available.
type
ThreadedSocketServiceRunCallback = SocketConnection -> Maybe Object -> IO Boolgi-gio GI.Gio.Objects.ThreadedSocketService The run signal is emitted in a worker thread in response to an incoming connection. This thread is dedicated to handling connection and may perform blocking IO. The signal handler need not return until the connection is closed.
-
gi-gio GI.Gio.Objects.ThreadedSocketService Connect a signal handler for the run signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after threadedSocketService #run callback
By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension. -
gi-gio GI.Gio.Objects.ThreadedSocketService Construct a GValueConstruct with valid value for the “max-threads” property. This is rarely needed directly, but it is used by new.
getThreadedSocketServiceMaxThreads :: (MonadIO m, IsThreadedSocketService o) => o -> m Int32gi-gio GI.Gio.Objects.ThreadedSocketService Get the value of the “max-threads” property. When overloading is enabled, this is equivalent to
get threadedSocketService #maxThreads
-
gi-gio GI.Gio.Objects.ThreadedSocketService Connect a signal handler for the run signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on threadedSocketService #run callback
threadedSocketServiceNew :: (HasCallStack, MonadIO m) => Int32 -> m ThreadedSocketServicegi-gio GI.Gio.Objects.ThreadedSocketService Creates a new ThreadedSocketService with no listeners. Listeners must be added with one of the SocketListener "add" methods. Since: 2.22