- type Connection = ForeignPtr ConnectionTag
- data BusType
- busGet :: BusType -> IO Connection
- busConnectionUnref :: Connection -> IO ()
- send :: Connection -> Message -> Word32 -> IO Word32
- sendWithReplyAndBlock :: Connection -> Message -> Int -> IO Message
- flush :: Connection -> IO ()
- close :: Connection -> IO ()
- withConnection :: BusType -> (Connection -> IO a) -> IO a
- readWriteDispatch :: Connection -> Int -> IO Bool
- addFilter :: Connection -> (Message -> IO Bool) -> IO ()
- addMatch :: Connection -> Bool -> String -> IO ()
- data RequestNameReply
- busRequestName :: Connection -> String -> [Int] -> IO RequestNameReply
Multiple buses may be active simultaneously on a single system. The BusType indicates which one to use.
Force the dereference of a connection. Note that this is usually not necessary since the connections are garbage collected automatically.
Message to the outgoing message queue.
Open a connection and run an IO action, ensuring it is properly closed when you're done.
Main Loop Management
Block until a message is read or written, then return True unless a disconnect message is received.