Re: [twsocket] How can we automatically set timeout in FTP

2006-07-06 Thread Wilfried Mestdagh
Hello Arnold,

 Correct, if I'm not mistaken you in fact only need OnRequestDone to
 check the flow / errors / do next action.

 There you check ErrCode, if > 0 there is server or winsock error.
 winsock error  >= 1. Also check RequestType to check the state of
 the component. You probably want to make a case statement around it.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, July 6, 2006, 11:08, Arnold FLUTEAUX wrote:

> Hello Wilfried,
 
> It’s true that it’s OK in sync mode with increasing or decreasing the
> timeout but I want to try the async mode. So, I put my code in RequestDone
> event and I launch async method step by step in testing the errcode
> (parameter of RequestDone).
> Are you sure that all errors will pass in requestDone with an ErrCode>0 ? I
> test only ErrCode. I don’t need to test other things in others events ?
 
> Hello Arnold,
 
>> It’s stupid because I had finished my tool !!! I hope that it’s almost the
>> same thing to do !
 
> If it is finished and working well then no need to change. It is not the
> same, but consider for a new project. It is not the same, it is
> different, but you have more control and you are very sure your program
> is never in some waiting loop.
 
> Just assign code to OnRequestDone event. There you check for server
> error or winsock error. In that event you take next action depending on
> success or failure of previous action. You probably have to write a
> state machine to know the state of the application because you are
> always coming in the same event handler.
 
> ---
> Rgds, Wilfried [TeamICS]
>  
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz

 

 

> Arnold Fluteaux

> Chargé d'Affaires

> SCJ Informatique

 

> 02.35.59.22.55

> 06.15.77.70.14

 


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] How can we automatically set timeout in FTP

2006-07-06 Thread Arnold FLUTEAUX
Hello Wilfried,
 
It’s true that it’s OK in sync mode with increasing or decreasing the
timeout but I want to try the async mode. So, I put my code in RequestDone
event and I launch async method step by step in testing the errcode
(parameter of RequestDone).
Are you sure that all errors will pass in requestDone with an ErrCode>0 ? I
test only ErrCode. I don’t need to test other things in others events ?
 
Hello Arnold,
 
> It’s stupid because I had finished my tool !!! I hope that it’s almost the
> same thing to do !
 
If it is finished and working well then no need to change. It is not the
same, but consider for a new project. It is not the same, it is
different, but you have more control and you are very sure your program
is never in some waiting loop.
 
Just assign code to OnRequestDone event. There you check for server
error or winsock error. In that event you take next action depending on
success or failure of previous action. You probably have to write a
state machine to know the state of the application because you are
always coming in the same event handler.
 
---
Rgds, Wilfried [TeamICS]
 
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

 

 

Arnold Fluteaux

Chargé d'Affaires

SCJ Informatique

 

02.35.59.22.55

06.15.77.70.14

 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] How can we automatically set timeout in FTP

2006-07-06 Thread Wilfried Mestdagh
Hello Arnold,

> It’s stupid because I had finished my tool !!! I hope that it’s almost the
> same thing to do !

If it is finished and working well then no need to change. It is not the
same, but consider for a new project. It is not the same, it is
different, but you have more control and you are very sure your program
is never in some waiting loop.

Just assign code to OnRequestDone event. There you check for server
error or winsock error. In that event you take next action depending on
success or failure of previous action. You probably have to write a
state machine to know the state of the application because you are
always coming in the same event handler.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, July 5, 2006, 10:16, Arnold FLUTEAUX wrote:

> Hello and thanks for these explanations
 
> I thought that with async mode, I couldn’t do sequential action. So if you
> say me that  it’s better in async mode that sync mode, I’m going to test it.
> It’s stupid because I had finished my tool !!! I hope that it’s almost the
> same thing to do !

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] How can we automatically set timeout in FTP

2006-07-05 Thread Arno Garrels
Wilfried Mestdagh wrote:
>> And for the timeout, if I asked if there  is  a method to know the
>> connection type or connection speed, it's because users can use this
>> system with high speed connection or very low speed connection.
> 
> If you use async you dont have to worry. Winsock will timeout / drop
> the 
> connection / whatever.

BTW: The same applies to the sync methods if property Timeout is set
to null ;-)


---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html




-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] How can we automatically set timeout in FTP

2006-07-05 Thread Arnold FLUTEAUX
Hello and thanks for these explanations
 
I thought that with async mode, I couldn’t do sequential action. So if you
say me that  it’s better in async mode that sync mode, I’m going to test it.
It’s stupid because I had finished my tool !!! I hope that it’s almost the
same thing to do !
 
 
 
Hello Arnold,
 
> need to do these transfers step by step and stop it in case of problem. I
> can’t download or upload several files in same times; that’s why I’m using
> synchronous methods and not asynchronous.
 
I understeand, but that is not a reason to go sync or async. For example
if you need to execute code after a button has clicked you also dont
write sequetial code, I assume you put it in OnClick. Wit async
components it is the same, and event is the signal to execute next
action, and depending on the state of the several events and eventually
the error codes the next action can be different.
 
> And for the timeout, if I asked if there  is  a method to know the
> connection type or connection speed, it’s because users can use this
system
> with high speed connection or very low speed connection.
 
If you use async you dont have to worry. Winsock will timeout / drop the
connection / whatever.
 
> My English is not very good so I hope that I’m clear !
 
It's clear. English is not my mother's tongue also :)
 
---
Rgds, Wilfried [TeamICS]
 
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

 

 

Arnold Fluteaux

Chargé d'Affaires

SCJ Informatique

 

02.35.59.22.55

06.15.77.70.14

 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] How can we automatically set timeout in FTP

2006-07-04 Thread Wilfried Mestdagh
Hello Arnold,

> need to do these transfers step by step and stop it in case of problem. I
> can’t download or upload several files in same times; that’s why I’m using
> synchronous methods and not asynchronous.

I understeand, but that is not a reason to go sync or async. For example
if you need to execute code after a button has clicked you also dont
write sequetial code, I assume you put it in OnClick. Wit async
components it is the same, and event is the signal to execute next
action, and depending on the state of the several events and eventually
the error codes the next action can be different.

> And for the timeout, if I asked if there  is  a method to know the
> connection type or connection speed, it’s because users can use this system
> with high speed connection or very low speed connection.

If you use async you dont have to worry. Winsock will timeout / drop the
connection / whatever.

> My English is not very good so I hope that I’m clear !

It's clear. English is not my mother's tongue also :)

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] How can we automatically set timeout in FTP

2006-07-04 Thread Arnold FLUTEAUX
Hello,

 

In fact, I must send files and then receive files. But I must send and
receive theses files in respecting their creating/modificating date. And for
example, if a file is not received correctly, I must stop the connection. I
need to do these transfers step by step and stop it in case of problem. I
can’t download or upload several files in same times; that’s why I’m using
synchronous methods and not asynchronous.

And for the timeout, if I asked if there  is  a method to know the
connection type or connection speed, it’s because users can use this system
with high speed connection or very low speed connection. 

My English is not very good so I hope that I’m clear !

 
 
Hello Arnold,
 
> But in my test, I'm used Put method, not putAsync method.
 
Please try the async methods, it is more encouraged :)

 

Arnold Fluteaux

Chargé d'Affaires

SCJ Informatique

 

02.35.59.22.55

06.15.77.70.14

 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] How can we automatically set timeout in FTP

2006-07-04 Thread Wilfried Mestdagh
Hello Arnold,

> But in my test, I'm used Put method, not putAsync method.

Please try the async methods, it is more encouraged :)

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] How can we automatically set timeout in FTP

2006-07-04 Thread Arno Garrels
Arnold FLUTEAUX wrote:
> Thanks.
> When I've modified the ftpclient.timeout from 15 to 60, theses
> disconnections had disappeared. 

15 is far too short, why don't you make it an user option?

> So I thought that this property was
> important because it's used in "WaitUntilReady" function. 

Yes it is.
But increasing component's Timeout won't change anything in case you
hit a winsock timeout/error. The error message you posted is a 
winsock error. When the component timeout triggers current,
synchronous method returns False with StatusCode 426 as well as
ErrorMessage "426 Timeout", see function TFtpClient.WaitUntilReady in
(OverbyteIcs)FtpCli.pas.


> And
> according to me, I wanted to set automatically this property with the
> speed of connections. 15 seconds is OK for high but not for a mobile
> connections at 9.6.

I would set it to 30 sec by default and would provide an option somewhere
in the settings.

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

> Arnold
> 
> 
> Arnold FLUTEAUX wrote:
>> I've question on the timeout.
>> 
>> With a high speed connection, the timeout is equal to 15 seconds. But
>> with a very low connection (9,6 kbits/s) , they are several problems
>> and the ftp disconnect itself with the message "500 Connection closed
>> time out (winsock error #100060)".
>> So to avoid this problem, I have
>> increased the timeout to 60 seconds.
> 
> Those kind of errors are caused by a winsock timeout. I think it
> should be possible to set that value somewhere in the registry, have
> you? Property TFtpCli.Timeout effects only in case you would use the
> sync methods, and it triggers independent of the winsock timeout,
> however the shorter timeout would trigger first.
> 
>> 
>> So is it the good solution ? And if it's OK, how can set the timeout
>> automatically ?
> 
> If you mean the system-wide winsock timeout, I don't think it is a
> good idea to change that automatically on system you do not own.
> 
> ---
> Arno Garrels [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> 
> 
>> 
>> Thanks
>> 
>> Arnold
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] How can we automatically set timeout in FTP

2006-07-04 Thread Arnold FLUTEAUX
>Property TFtpCli.Timeout effects only in case you would use the sync
methods, and it triggers independent of the winsock timeout, however
the shorter timeout would trigger first.

But in my test, I'm used Put method, not putAsync method.

Arnold


Message: 2
Date: Tue, 4 Jul 2006 10:42:09 +0200
From: "Arnold FLUTEAUX" <[EMAIL PROTECTED]>
Subject: [twsocket] How can we automatically set timeout in FTP
To: 
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain;   charset="us-ascii"

Hello,

 

I'm french. I'm using a FTP developing with ICS FTP client. It's really good
!

I've question on the timeout.

With a high speed connection, the timeout is equal to 15 seconds. But with a
very low connection (9,6 kbits/s) , they are several problems and the ftp
disconnect itself with the message "500 Connection closed time out (winsock
error #100060)". So to avoid this problem, I have increased the timeout to
60 seconds. 

So is it the good solution ? And if it's OK, how can set the timeout
automatically ?

Thanks

Arnold



--

Message: 3
Date: Tue, 4 Jul 2006 12:18:47 +0200
From: "Arno Garrels" <[EMAIL PROTECTED]>
Subject: Re: [twsocket] How can we automatically set timeout in FTP
To: "ICS support mailing" 
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain;   charset="iso-8859-1"

Arnold FLUTEAUX wrote:
> I've question on the timeout.
> 
> With a high speed connection, the timeout is equal to 15 seconds. But
> with a very low connection (9,6 kbits/s) , they are several problems
> and the ftp disconnect itself with the message "500 Connection closed
> time out (winsock error #100060)".
> So to avoid this problem, I have
> increased the timeout to 60 seconds.

Those kind of errors are caused by a winsock timeout. I think it should
be possible to set that value somewhere in the registry, have you?
Property TFtpCli.Timeout effects only in case you would use the sync
methods, and it triggers independent of the winsock timeout, however
the shorter timeout would trigger first. 

> 
> So is it the good solution ? And if it's OK, how can set the timeout
> automatically ?

If you mean the system-wide winsock timeout, I don't think it is a good
idea to change that automatically on system you do not own.

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
 

> 
> Thanks
> 
> Arnold


--

Message: 4
Date: Tue, 4 Jul 2006 08:44:01 -0300
From: ?ric Fleming Bonilha <[EMAIL PROTECTED]>
Subject: Re: [twsocket] UDP Concept doubt
To: "ICS support mailing" 
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=original

Thanks Dan!!!

Now I got it

Thanks!!!



-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] How can we automatically set timeout in FTP

2006-07-04 Thread Arnold FLUTEAUX
Thanks.
When I've modified the ftpclient.timeout from 15 to  60, theses
disconnections had disappeared. So I thought that this property was
important because it's used in "WaitUntilReady" function. And according to
me, I wanted to set automatically this property with the speed of
connections. 15 seconds is OK for high but not for a mobile connections at
9.6.
Arnold


Arnold FLUTEAUX wrote:
> I've question on the timeout.
> 
> With a high speed connection, the timeout is equal to 15 seconds. But
> with a very low connection (9,6 kbits/s) , they are several problems
> and the ftp disconnect itself with the message "500 Connection closed
> time out (winsock error #100060)".
> So to avoid this problem, I have
> increased the timeout to 60 seconds.

Those kind of errors are caused by a winsock timeout. I think it should
be possible to set that value somewhere in the registry, have you?
Property TFtpCli.Timeout effects only in case you would use the sync
methods, and it triggers independent of the winsock timeout, however
the shorter timeout would trigger first. 

> 
> So is it the good solution ? And if it's OK, how can set the timeout
> automatically ?

If you mean the system-wide winsock timeout, I don't think it is a good
idea to change that automatically on system you do not own.

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
 

> 
> Thanks
> 
> Arnold




-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] How can we automatically set timeout in FTP

2006-07-04 Thread Arno Garrels
Arnold FLUTEAUX wrote:
> I've question on the timeout.
> 
> With a high speed connection, the timeout is equal to 15 seconds. But
> with a very low connection (9,6 kbits/s) , they are several problems
> and the ftp disconnect itself with the message "500 Connection closed
> time out (winsock error #100060)".
> So to avoid this problem, I have
> increased the timeout to 60 seconds.

Those kind of errors are caused by a winsock timeout. I think it should
be possible to set that value somewhere in the registry, have you?
Property TFtpCli.Timeout effects only in case you would use the sync
methods, and it triggers independent of the winsock timeout, however
the shorter timeout would trigger first. 

> 
> So is it the good solution ? And if it's OK, how can set the timeout
> automatically ?

If you mean the system-wide winsock timeout, I don't think it is a good
idea to change that automatically on system you do not own.

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
 

> 
> Thanks
> 
> Arnold
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] How can we automatically set timeout in FTP

2006-07-04 Thread Arnold FLUTEAUX
Hello,

 

I'm french. I'm using a FTP developing with ICS FTP client. It's really good
!

I've question on the timeout.

With a high speed connection, the timeout is equal to 15 seconds. But with a
very low connection (9,6 kbits/s) , they are several problems and the ftp
disconnect itself with the message "500 Connection closed time out (winsock
error #100060)". So to avoid this problem, I have increased the timeout to
60 seconds. 

So is it the good solution ? And if it's OK, how can set the timeout
automatically ?

Thanks

Arnold

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be