-- | Sends a message over a luxi transport.
sendMsg :: Client -> String -> IO ()
sendMsg s buf =
    let _send obuf = do
          sbytes <- withTimeout queryTimeout
                    "sending luxi message" $
                    S.send (socket s) obuf
          unless (sbytes == length obuf) $ _send (drop sbytes obuf)
    in _send (buf ++ [eOM])
sendMsg :: Client -> String -> IO ()
sendMsg s buf =
    let _send obuf = do
          sbytes <- withTimeout queryTimeout
                    "sending luxi message" $
                    S.send (socket s) obuf
          unless (sbytes == length obuf) $ _send (drop sbytes obuf)
    in _send (buf ++ [eOM])
sendMsg s buf =
    let _send obuf = do
          sbytes <- withTimeout queryTimeout
                    "sending luxi message" $
                    S.send (socket s) obuf
          unless (sbytes == length obuf) $ _send (drop sbytes obuf)
    in _send (buf ++ [eOM])