[jira] Created: (HTTPCLIENT-890) CLONE -Allow configuration of SO_LINGER (client socket close ReSet)

View: New views
5 Messages — Rating Filter:   Alert me  

[jira] Created: (HTTPCLIENT-890) CLONE -Allow configuration of SO_LINGER (client socket close ReSet)

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

CLONE -Allow configuration of SO_LINGER (client socket close ReSet)
-------------------------------------------------------------------

                 Key: HTTPCLIENT-890
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-890
             Project: HttpComponents HttpClient
          Issue Type: Improvement
          Components: HttpClient
         Environment: Operating System: All
Platform: All
            Reporter: thinker0
            Assignee: HttpComponents Dev
            Priority: Minor


There is currently no way to configure the SO_LINGER option on a socket.

Please change the HttpClient class to allow the configuration of the SO_LINGER
option on a socket, similar to the way the SO_TIMEOUT can be configured.

Suggested extension to the interface of the HttpClient class:
- Add method setSoLinger() to set the current setting for SO_LINGER. The method
could accept one argument. A negative value could indicate that the SO_LINGER
should be disabled.
- Add method getSoLinger() that returns the current setting for SO_LINGER. A
negative value would indicate that the SO_LINGER option is disabled.

See:
http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#setSoLinger(boolean,%20int)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (HTTPCLIENT-890) CLONE -Allow configuration of SO_LINGER (client socket close ReSet)

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/HTTPCLIENT-890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

thinker0 updated HTTPCLIENT-890:
--------------------------------


socket.setSoLinger(linger >= 0, linger-1);

setLinger(params, 1);

Client         ->             Server
FIN  -------------------->
FIN_ACK <---------------
RST --------------------> Close
Close

i want that

socket.setSoLinger(true, 0)

> CLONE -Allow configuration of SO_LINGER (client socket close ReSet)
> -------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-890
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-890
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>         Environment: Operating System: All
> Platform: All
>            Reporter: thinker0
>            Assignee: HttpComponents Dev
>            Priority: Minor
>
> There is currently no way to configure the SO_LINGER option on a socket.
> Please change the HttpClient class to allow the configuration of the SO_LINGER
> option on a socket, similar to the way the SO_TIMEOUT can be configured.
> Suggested extension to the interface of the HttpClient class:
> - Add method setSoLinger() to set the current setting for SO_LINGER. The method
> could accept one argument. A negative value could indicate that the SO_LINGER
> should be disabled.
> - Add method getSoLinger() that returns the current setting for SO_LINGER. A
> negative value would indicate that the SO_LINGER option is disabled.
> See:
> http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#setSoLinger(boolean,%20int)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (HTTPCLIENT-890) CLONE -Allow configuration of SO_LINGER (client socket close ReSet)

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/HTTPCLIENT-890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12777001#action_12777001 ]

thinker0 edited comment on HTTPCLIENT-890 at 11/12/09 2:08 PM:
---------------------------------------------------------------

socket.setSoLinger(linger >= 0, linger-1);

setLinger(params, 1);

Client       < ----------------- >             Server
FIN  --------------------  >
FIN_ACK < ---------------
RST -------------------- > Close
Close

i want that

socket.setSoLinger(true, 0)

      was (Author: thinker0):
    socket.setSoLinger(linger >= 0, linger-1);

setLinger(params, 1);

Client         ->             Server
FIN  -------------------->
FIN_ACK <---------------
RST --------------------> Close
Close

i want that

socket.setSoLinger(true, 0)
 

> CLONE -Allow configuration of SO_LINGER (client socket close ReSet)
> -------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-890
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-890
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>         Environment: Operating System: All
> Platform: All
>            Reporter: thinker0
>            Assignee: HttpComponents Dev
>            Priority: Minor
>
> There is currently no way to configure the SO_LINGER option on a socket.
> Please change the HttpClient class to allow the configuration of the SO_LINGER
> option on a socket, similar to the way the SO_TIMEOUT can be configured.
> Suggested extension to the interface of the HttpClient class:
> - Add method setSoLinger() to set the current setting for SO_LINGER. The method
> could accept one argument. A negative value could indicate that the SO_LINGER
> should be disabled.
> - Add method getSoLinger() that returns the current setting for SO_LINGER. A
> negative value would indicate that the SO_LINGER option is disabled.
> See:
> http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#setSoLinger(boolean,%20int)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (HTTPCLIENT-890) CLONE -Allow configuration of SO_LINGER (client socket close ReSet)

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/HTTPCLIENT-890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-890.
------------------------------------------

    Resolution: Won't Fix
      Assignee:     (was: HttpComponents Dev)

This issue is probably not that simple as it may seem. HttpClient applies SO_LINGER value when _opening_ a new connection. What you actually want is to cause the connection to send a RST packet. But this is usually done when _closing_ the connection. So, most likely what you want to do is to override the #shutdown method of DefaultClientConnection and make it set the required SO_LINGER parameter on the socket prior to closing it.

class MyClientConnection extends DefaultClientConnection {

    @Override
    public void shutdown() throws IOException {
        Socket sock = getSocket();
        sock.setSoLinger(true, 0);
        super.shutdown();
    }
   
}

Hope this helps

Oleg


> CLONE -Allow configuration of SO_LINGER (client socket close ReSet)
> -------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-890
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-890
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>         Environment: Operating System: All
> Platform: All
>            Reporter: thinker0
>            Priority: Minor
>
> There is currently no way to configure the SO_LINGER option on a socket.
> Please change the HttpClient class to allow the configuration of the SO_LINGER
> option on a socket, similar to the way the SO_TIMEOUT can be configured.
> Suggested extension to the interface of the HttpClient class:
> - Add method setSoLinger() to set the current setting for SO_LINGER. The method
> could accept one argument. A negative value could indicate that the SO_LINGER
> should be disabled.
> - Add method getSoLinger() that returns the current setting for SO_LINGER. A
> negative value would indicate that the SO_LINGER option is disabled.
> See:
> http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#setSoLinger(boolean,%20int)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Closed: (HTTPCLIENT-890) CLONE -Allow configuration of SO_LINGER (client socket close ReSet)

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/HTTPCLIENT-890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

thinker0 closed HTTPCLIENT-890.
-------------------------------


thanks. ^^;

> CLONE -Allow configuration of SO_LINGER (client socket close ReSet)
> -------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-890
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-890
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>         Environment: Operating System: All
> Platform: All
>            Reporter: thinker0
>            Priority: Minor
>
> There is currently no way to configure the SO_LINGER option on a socket.
> Please change the HttpClient class to allow the configuration of the SO_LINGER
> option on a socket, similar to the way the SO_TIMEOUT can be configured.
> Suggested extension to the interface of the HttpClient class:
> - Add method setSoLinger() to set the current setting for SO_LINGER. The method
> could accept one argument. A negative value could indicate that the SO_LINGER
> should be disabled.
> - Add method getSoLinger() that returns the current setting for SO_LINGER. A
> negative value would indicate that the SO_LINGER option is disabled.
> See:
> http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#setSoLinger(boolean,%20int)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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