Re: [xSocket-develop] Question: ConnectionTimeout
Status: Inactive
Brought to you by:
grro
|
From: nova s. <mar...@gm...> - 2014-10-08 08:29:16
|
Hi Cristina,
>From the source I've traced. if we set ConnectionTimeout parameter to 0,
then it will use the default IConnection.MAX_TIMEOUT_MILLIS which is
Long.MAX_VALUE.
So if you want to never stop the connections, I suggest to reassign the
connection timeout each time the onConnectionTimeout method is reached.
Regards,
Nova.S
On Mon, Oct 6, 2014 at 9:34 PM, MANITIU, Cristina Maria (Cristina Maria)**
CTR ** <cri...@al...> wrote:
> Hello,
>
>
>
> I understand from your answer that If we don’t use “nbc.close()” the
> connection will never be closed. But if we set ConnectionTimeout parameter
> to 0, isn’t the same thing (the connection will never be stopped)?
>
> The whole idea is to never stop the connections, that is what we are
> trying.
>
>
>
> Thank you,
>
> Cristina
>
> *From:* nova saputra [mailto:mar...@gm...]
> *Sent:* Monday, October 06, 2014 11:58 AM
> *To:* MANITIU, Cristina Maria (Cristina Maria)** CTR **
> *Cc:* xso...@li...
> *Subject:* Re: [xSocket-develop] Question: ConnectionTimeout
>
>
>
> Hi Cristina,
>
>
>
> IMHO if you want to keep the connection, you dont need to do
> "nbc.close();".
>
> It will close connection even you return true on the method.
>
> Have you tried using IIdleTimeoutHandler? I think thats what you are
> looking :)
>
>
>
>
>
> Regards,
>
> Nova.S
>
>
>
>
>
> On Thu, Sep 4, 2014 at 9:46 PM, MANITIU, Cristina Maria (Cristina Maria)**
> CTR ** <cri...@al...> wrote:
>
> Hello,
>
>
>
> I have a question regarding ConnectionTimeout parameter
> and onConnectionTimeout method: if we set the value for ConnectionTimeout
> to 0 it means that the connection will never timeout and the method
> onConnectionTimeout will never be called?
>
> Or there is another method to never close INonBlockingConnection?
>
> In our code we have implemented the method onConnectionTimeout as
> you specify in your documentation:
>
>
>
> *public* *boolean* onConnectionTimeout(INonBlockingConnection nbc)
> *throws* *IOException* {
>
>
>
> nbc.close();
>
> *return* *true*;
>
> }
>
>
>
> And we don’t want to close at a specified amount of time the
> NonBlockingConnections.
>
>
>
> Any suggestions will be appreciated.
>
>
>
> Thank you,
>
> Cristina Manitiu
>
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds. Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> xSocket-develop mailing list
> xSo...@li...
> https://lists.sourceforge.net/lists/listinfo/xsocket-develop
>
>
>
|