send :: Connection -> Message
     -> Word32    -- ^Serial.
     -> IO Word32 -- ^Returned serial.
send conn msg serial =
  withForeignPtr conn $ \conn -> do
    withForeignPtr msg $ \msg -> do
      with serial $ \serial -> do
        catchOom $ connection_send conn msg serial
        peek serial
send :: Connection -> Message
     -> Word32    -- ^Serial.
     -> IO Word32
send conn msg serial =
  withForeignPtr conn $ \conn -> do
    withForeignPtr msg $ \msg -> do
      with serial $ \serial -> do
        catchOom $ connection_send conn msg serial
        peek serial
send conn msg serial =
  withForeignPtr conn $ \conn -> do
    withForeignPtr msg $ \msg -> do
      with serial $ \serial -> do
        catchOom $ connection_send conn msg serial
        peek serial