memcache-0.3.0.2: A memcached client library.
Copyright(c) David Terei 2016
LicenseBSD
Maintainercode@davidterei.com
Stabilitystable
PortabilityGHC
Safe HaskellSafe-Inferred
LanguageHaskell2010

Database.Memcache.Server

Contents

Description

Handles the connections between a Memcached client and a single server.

Memcached expected errors (part of protocol) are returned in the Response, unexpected errors (e.g., network failure) are thrown as exceptions. While the Server datatype supports a failed and failedAt flag for managing retries, it's up to consumers to use this.

Synopsis

Server

data Server Source #

Memcached server connection.

Instances

Instances details
Show Server Source # 
Instance details

Defined in Database.Memcache.Server

Eq Server Source # 
Instance details

Defined in Database.Memcache.Server

Methods

(==) :: Server -> Server -> Bool #

(/=) :: Server -> Server -> Bool #

Ord Server Source # 
Instance details

Defined in Database.Memcache.Server

newServer :: HostName -> ServiceName -> Authentication -> IO Server Source #

Create a new Memcached server connection.

sendRecv :: Server -> Request -> IO Response Source #

Send and receive a single request/response pair to the Memcached server.

withSocket :: Server -> (Socket -> IO a) -> IO a Source #

Run a function with access to an server socket for using send and recv.

close :: Server -> IO () Source #

Close the server connection. If you perform another operation after this, the connection will be re-established.