On Thu, Jan 5, 2012 at 10:40 AM, Johannes Waldmann
<waldm...@imn.htwk-leipzig.de> wrote:
> How could I use haxr (http://www.haskell.org/haskellwiki/HaXR)
> to build a stateful server?
>
> It should listen on some port,
> and fork threads (inside Haskell land) to handle incoming calls.
> Any of the Haskell web frameworks can do this?

I use HaXR in conjunction with Snap. It basically boils down to using
Network.XmlRpc.Server (handleCall, methods) in conjunction with Snap's
getRequestBody and writeLBS.

The good news is you don't need to worry about forking your own
threads, the web server handles that. To make calls stateful, you just
stash away a reference in the handler you give Snap (or whatever web
server you use).

Anthony

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to