-- |Block until a message is read or written, then return True unless a
-- disconnect message is received.
readWriteDispatch :: Connection
                  -> Int -- ^Timeout, in milliseconds.
                  -> IO Bool
readWriteDispatch conn timeout = do
  withForeignPtr conn $ \conn ->
    connection_read_write_dispatch conn timeout

-- "a" here is the type of the callback function.
readWriteDispatch :: Connection
                  -> Int -- ^Timeout, in milliseconds.
                  -> IO Bool
readWriteDispatch conn timeout = do
  withForeignPtr conn $ \conn ->
    connection_read_write_dispatch conn timeout

-- "a" here is the type of the callback function.
readWriteDispatch conn timeout = do
  withForeignPtr conn $ \conn ->
    connection_read_write_dispatch conn timeout

-- "a" here is the type of the callback function.