hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCORE-288) Change TCP_NODELAY and SO_KEEPALIVE on the fly
Date Sun, 08 Jan 2012 17:37:39 GMT

    [ https://issues.apache.org/jira/browse/HTTPCORE-288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182252#comment-13182252

Oleg Kalnichevski commented on HTTPCORE-288:

For some reason I always thought TCP_NODELAY and SO_KEEPALIVE only could be applied to newly
created sockets only. Are you sure they can be changed on an already initialized socket?

> Change TCP_NODELAY and SO_KEEPALIVE on the fly
> ----------------------------------------------
>                 Key: HTTPCORE-288
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-288
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: HttpCore
>    Affects Versions: 4.2-alpha2
>            Reporter: Geir Harald Hansen
>            Priority: Minor
> Request:
> HttpConnection#setTcpNoDelay() and setSocketKeepalive() methods to modify those socket
settings on the fly like can be done with setSocketTimeout()
> Motivation:
> Set different socket options depending on the request to support different services on
the same port. E.g. turn on TCP_NODELAY for requests to an AJAX-based unix shell, but turn
it off for transferring large files. Turn on SO_KEEPALIVE and turn off socket timeout for
long poll (comet) requests, but not for other requests.
> Potential problem:
> When using persistent connections it is easy to forget that these options survive to
the next request. This situation exists with socket timeout already, though. You have to remember
to set it back when sending a response if you don't want it for the next request. Perhaps
a way to set timeout/nodelay/keepalive temporarily only for the current request is useful.
Either way, I'd be happy to just be able to set nodelay and keepalive on the fly.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message