Am 03.12.2012 20:17, schrieb Denis Loh:
It was the most obvious way to set the keepAlive of a request. I will move it to another place, however I have to distinguish between the two versions HTTPReply::setKeepAliveTimeout and this new type of configuration. Is there a version number I could use for that?

Why do you want to set the keep alive timeout for the request? It should be completely transparent for the application, how long the keep alive timeout really is. Http is conectionless, so keeping the connection is just a performance issue. But not that major, that you should really bother.

But if you really want to, you could do:

tnt::Configurator configurator(request.getApplication());
configurator.setKeepAliveTimeout(mytimeout);

tnt::Cofigurator works on both versions. It is like a compatibility layer.

But keep in mind that this is a global setting, so it do affect all requests, not only the current one.

The more natural way to set the keep alive timeout is to set it at server start up in your tntnet.conf (or tntnet.xml in the trunk version). If you use the application variant, you can use this compatibility layer tnt::Configurator.

Tommi
------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
BUILD Helping you discover the best ways to construct your parallel projects.
http://goparallel.sourceforge.net
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to