sendRequest :: OpCode -> Key -> Word8 -> (Ptr Request -> IO ())
            -> Int -> (Ptr Request -> IO ()) -> Word32 -> CAS -> Handle -> IO ()
sendRequest op key elen epoke vlen vpoke opaque cas h =
    bracket (mallocRequest op key elen epoke vlen vpoke opaque cas) free $ \req -> do
        hPutBuf h req (24 + S.length key + fromIntegral elen + vlen)
        hFlush h

sendRequest :: OpCode -> Key -> Word8 -> (Ptr Request -> IO ())
            -> Int -> (Ptr Request -> IO ()) -> Word32 -> CAS -> Handle -> IO ()
sendRequest op key elen epoke vlen vpoke opaque cas h =
    bracket (mallocRequest op key elen epoke vlen vpoke opaque cas) free $ \req -> do
        hPutBuf h req (24 + S.length key + fromIntegral elen + vlen)
        hFlush h

sendRequest op key elen epoke vlen vpoke opaque cas h =
    bracket (mallocRequest op key elen epoke vlen vpoke opaque cas) free $ \req -> do
        hPutBuf h req (24 + S.length key + fromIntegral elen + vlen)
        hFlush h
