Re: [cp-patches] FYI: Socket timeout impl and fix

2006-05-14 Thread Casey Marshall
On May 13, 2006, at 8:14 AM, Michael Koch wrote: On Sat, May 13, 2006 at 05:11:16PM +0200, Sven de Marothy wrote: On Sat, 2006-05-13 at 16:58 +0200, Michael Koch wrote: AFAIK Linux is the only one. If we want to stay portable we need to use select() and wait for the time of the timeout. In

Re: [cp-patches] FYI: Socket timeout impl and fix

2006-05-14 Thread Sven de Marothy
On Sun, 2006-05-14 at 00:17 -0700, Casey Marshall wrote: On May 12, 2006, at 2:06 PM, Sven de Marothy wrote: This adds the 1.5 timeout methods in URLConnection and implements them for HttUrlConnection (and HttpsUrlConnection). It also fixes a long-standing bug in the native-target-layer

Re: [cp-patches] FYI: Socket timeout impl and fix

2006-05-14 Thread Casey Marshall
On May 14, 2006, at 9:08 AM, Sven de Marothy wrote: On Sun, 2006-05-14 at 00:17 -0700, Casey Marshall wrote: On May 12, 2006, at 2:06 PM, Sven de Marothy wrote: This adds the 1.5 timeout methods in URLConnection and implements them for HttUrlConnection (and HttpsUrlConnection). It also

Re: [cp-patches] FYI: Socket timeout impl and fix

2006-05-14 Thread Sven de Marothy
On Sun, 2006-05-14 at 12:45 -0700, Casey Marshall wrote: Yeah, I figured out what you were doing when going to sleep last night ;-) But still, wouldn't an be better for that? if( callA() == 0 callB() == 0 ) result = value1; else result = value2; Versus: result = ((callA() | callB())

Re: [cp-patches] FYI: Socket timeout impl and fix

2006-05-14 Thread Casey Marshall
On May 14, 2006, at 2:40 PM, Sven de Marothy wrote: On Sun, 2006-05-14 at 12:45 -0700, Casey Marshall wrote: Yeah, I figured out what you were doing when going to sleep last night ;-) But still, wouldn't an be better for that? if( callA() == 0 callB() == 0 ) result = value1; else

Re: [cp-patches] FYI: Socket timeout impl and fix

2006-05-13 Thread Robert Schuster
Hi, could you test whether Socket.setSoTimeout() really sets the send and receive timeout? cya Robert Sven de Marothy wrote: This adds the 1.5 timeout methods in URLConnection and implements them for HttUrlConnection (and HttpsUrlConnection). It also fixes a long-standing bug in the

Re: [cp-patches] FYI: Socket timeout impl and fix

2006-05-13 Thread Sven de Marothy
On Sat, 2006-05-13 at 13:54 +0200, Robert Schuster wrote: Hi, could you test whether Socket.setSoTimeout() really sets the send and receive timeout? I did, and it seems to work fine for me (A difference in 3 minutes and 1 second timeout when you're setting it to 1 second is quite noticable).

Re: [cp-patches] FYI: Socket timeout impl and fix

2006-05-13 Thread Michael Koch
On Sat, May 13, 2006 at 04:54:02PM +0200, Sven de Marothy wrote: On Sat, 2006-05-13 at 13:54 +0200, Robert Schuster wrote: Hi, could you test whether Socket.setSoTimeout() really sets the send and receive timeout? I did, and it seems to work fine for me (A difference in 3 minutes

Re: [cp-patches] FYI: Socket timeout impl and fix

2006-05-13 Thread Sven de Marothy
On Sat, 2006-05-13 at 16:58 +0200, Michael Koch wrote: AFAIK Linux is the only one. If we want to stay portable we need to use select() and wait for the time of the timeout. In libgcj its already handled this way. Thats the safest. Actually, I don't think we need to stay portable though. The

Re: [cp-patches] FYI: Socket timeout impl and fix

2006-05-13 Thread Michael Koch
On Sat, May 13, 2006 at 05:11:16PM +0200, Sven de Marothy wrote: On Sat, 2006-05-13 at 16:58 +0200, Michael Koch wrote: AFAIK Linux is the only one. If we want to stay portable we need to use select() and wait for the time of the timeout. In libgcj its already handled this way. Thats the

[cp-patches] FYI: Socket timeout impl and fix

2006-05-12 Thread Sven de Marothy
This adds the 1.5 timeout methods in URLConnection and implements them for HttUrlConnection (and HttpsUrlConnection). It also fixes a long-standing bug in the native-target-layer aicas thingie. SO_TIMEOUT timeout was being used as a socket option, when it's the name of the Java socket option.