memcache-0.0.1: A memcached client library.

Safe HaskellNone
LanguageHaskell98

Database.Memcache.Server

Description

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

Synopsis

Documentation

data Server Source

A memcached server connection.

Instances

newServer :: HostName -> PortNumber -> IO Server Source

Create a new memcached 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.

send :: Socket -> Request -> IO () Source

Send a request to the memcached server.

recv :: Socket -> IO Response Source

Retrieve a single response from the memcached server. TODO: read into buffer to minimize read syscalls

close :: Server -> IO () Source

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