Copyright | (c) David Terei, 2016 |
---|---|
License | BSD |
Maintainer | code@davidterei.com |
Stability | stable |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
Handles a single Memcached connection, sending and receiving requests.
Types
data Socket :: *
Represents a socket. The fields are, respectively:
- File descriptor
- Socket family
- Socket type
- Protocol number
- Status flag
If you are calling the MkSocket
constructor directly you should ensure
you have called withSocketsDo
.
Memcached response packet.
Operations
recv :: Socket -> IO Response Source
Retrieve a single response from the Memcached server. FIXME: read into buffer to minimize read syscalls
Serialization / Deserialization
szResponse :: Response -> Builder Source
Serialize a response to a ByteString Builder.
dzResponse :: Header -> ByteString -> Response Source
Deserialize a Response body.