curl-1.3.8: Haskell binding to libcurl

Copyright | (c) Galois Inc 2007-2009
License | BSD3
Maintainer | Sigbjorn Finne <sof@galois.com>
Stability | provisional
Portability | portable
Safe Haskell | Safe-Inferred
Language | Haskell98

Network.Curl.Types

Description

Basic set of types for the Haskell curl binding, including the `Curl` handle type which holds the C library stateful connection handle along with a set of cleanup actions tht should be performed upon shutting down the curl session.

Synopsis

- type CurlH = Ptr Curl_
- type URLString = String
- type Port = Long
- type Long = Word32
- type LLong = Word64
- data Slist_
- data Curl
- curlPrim :: Curl -> (IORef OptionMap -> CurlH -> IO a) -> IO a
- mkCurl :: CurlH -> IO Curl
- mkCurlWithCleanup :: CurlH -> OptionMap -> IO Curl
- type OptionMap = IntMap (IO ())
- shareCleanup :: IORef OptionMap -> IO OptionMap
- runCleanup :: IORef OptionMap -> IO ()
- updateCleanup :: IORef OptionMap -> Int -> IO () -> IO ()

# Documentation

type CurlH = Ptr Curl_ Source #

type URLString = String Source #

type Port = Long Source #

type Long = Word32 Source #

type LLong = Word64 Source #

data Slist_ Source #

data Curl Source #

curlPrim :: Curl -> (IORef OptionMap -> CurlH -> IO a) -> IO a Source #

Execute a "primitve" curl operation. NOTE: See warnings about the use of `withForeginPtr`.

mkCurl :: CurlH -> IO Curl Source #

Allocates a Haskell handle from a C handle.

mkCurlWithCleanup :: CurlH -> OptionMap -> IO Curl Source #

Allocates a Haskell handle from a C handle.

type OptionMap = IntMap (IO ()) Source #

shareCleanup :: IORef OptionMap -> IO OptionMap Source #

runCleanup :: IORef OptionMap -> IO () Source #

updateCleanup :: IORef OptionMap -> Int -> IO () -> IO () Source #