[Haskell-cafe] TCP Server
Alexander V Vershilov
alexander.vershilov at gmail.com
Fri Jan 27 00:47:02 CET 2012
Recently I asked about tcp server libraries  and there was only one
answer haskell-scallable-server , but in that package there was some
dependencies and server logic that are not good for my task.
So I decided to make a library with skeletons for different types of
tcp servers and a basic library to make server .
Now there is only warp based (simplified) tcp server.
Main logic is:
* handle new connection and start iteratee green thread
* enumerator (library side) reads socket and send data into enumeratee
* enumeratee consumes input and produces server command (now simply output)
and push it into iteratee (server side)
* iteratee server side reads command and performs action (now simply output
It gives application possibility to store state in enumerator.
My questions to community:
1). can you help to make code better ;) maybe there are some stupid mistakes
2). is there any ideas what thing can be add to the server to make it reusable
And another thing that I want to add other types of server e.g. single threaded,
with workers pool, or other types. And I want to ask what types of servers
will be effective in haskell.
Alexander V Vershilov.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 490 bytes
Desc: Digital signature
More information about the Haskell-Cafe