HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduledbus-1.4.1Haskell2010

DBus.Socket

D-Bus sockets are used for communication between two peers. In this model, there is no "bus" or "client", simply two endpoints sending messages.

Most users will want to use the DBus.Client module instead.

  • 5 types
  • 21 values
  • Packagedbus-1.4.1
  • Exports26
  • LanguageHaskell2010
  • LicenceApache-2.0
  • SourceSocket.hs

Sockets

3 declarations
datadata Socket
#

An open socket to another process. Messages can be sent to the remote peer using send, or received using receive.

valuesend :: Message msg => Socket -> msg -> (Serial -> IO a) -> IO a
#

Send a single message, with a generated Serial. The second parameter exists to prevent race conditions when registering a reply handler; it receives the serial the message will be sent with, before it's actually sent.

Sockets are thread-safe. Only one message may be sent at a time; if multiple threads attempt to send messages concurrently, one will block until after the other has finished.

Throws SocketError on failure.

Receive the next message from the socket , blocking until one is available.

Sockets are thread-safe. Only one message may be received at a time; if multiple threads attempt to receive messages concurrently, one will block until after the other has finished.

Throws SocketError on failure.

Socket errors

5 declarations

Socket options

4 declarations

Used to perform authentication with the remote peer. After a transport has been opened, it will be passed to the authenticator. If the authenticator returns true, then the socket was authenticated.

Opening and closing sockets

3 declarations
valueclose :: Socket -> IO ()
#

Close an open Socket. Once closed, the socket is no longer valid and must not be used.

Listening for connections

6 declarations

Authentication

5 declarations
datadata Authenticator t
#

An Authenticator defines how the local peer (client) authenticates itself to the remote peer (server).