On 2013-11-29 2:20 AM, Sönke Ludwig wrote:

version (Havevibed) TCPConnection stream;

That's amazing, thanks ! Also, I couldn't find stream.stream.read so I
assumed I'd have to read as ubyte[] all the way. Should be very simple
there then!

On another subject, I was looking into ConnectionPool and it seems like
(for any reason) an unresponsive database (with maybe a bad timeout or
trapped in locking) would let connections accumulate until size_t.max
(one for every visitor). Wouldn't a 2^63 of these objects clog the RAM
and make the application crash? It would probably be a good idea to
limit this in an options associative array as to keep it at a consistent
value with the database's max connections. Something of the sorts:

struct PoolOptions {

size_t m_maxConnections;

} m_poolOptions;

:32 this(Connection delegate() connection_factory, PoolOptions options =
new PoolOptions(100))

:39 sizet cidx = mpoolOptions.m_maxConnections;

:44 if( cidx <= mpoolOptions.mmaxConnections ){

I would image it to be wise to put lockConnection in a yielded loop
where a connection is eventually returned. What do you think?