[twsocket] FTP Client - Size() Function

2005-07-30 Thread Keith Willis
Dear All,

Is there a bullet-proof way to get a remote File Size using the TFTPClient
component?

I noted the following documentation on the FEAT command in the FTPCli.pas
unit...


FEAT Command - numerous extensions have been made to the FTP protocol over
the past few years, although support of these new commands is very sporadic.
RFC2389 describes the FEAT command, which returns a multiline list of
extension supported by the server. Note that the SIZE command is an
extension,
and not supported on all FTP servers. An internet-draft 'Extensions to FTP'
document the most useful new commands. The responses of five common FTP
servers
to FEAT are listed below:


Cheers,
Keith Willis.


-- 
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] FTP Client - Size() Function

2005-07-30 Thread Francois PIETTE
Ise Size method.
--
[EMAIL PROTECTED]
http://www.overbyte.be

- Original Message - 
From: Keith Willis [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Saturday, July 30, 2005 11:44 AM
Subject: [twsocket] FTP Client - Size() Function


 Dear All,

 Is there a bullet-proof way to get a remote File Size using the 
 TFTPClient
 component?

 I noted the following documentation on the FEAT command in the 
 FTPCli.pas
 unit...


 FEAT Command - numerous extensions have been made to the FTP protocol over
 the past few years, although support of these new commands is very 
 sporadic.
 RFC2389 describes the FEAT command, which returns a multiline list of
 extension supported by the server. Note that the SIZE command is an
 extension,
 and not supported on all FTP servers. An internet-draft 'Extensions to 
 FTP'
 document the most useful new commands. The responses of five common FTP
 servers
 to FEAT are listed below:


 Cheers,
 Keith Willis.


 -- 
 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
 

-- 
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] FTP Client - Size() Function

2005-07-30 Thread Angus Robertson - Magenta Systems Ltd
 Is there a bullet-proof way to get a remote File Size using the 
 TFTPClient component?
 
 FEAT Command - numerous extensions have been made to the FTP protocol 
 over
 the past few years, although support of these new commands is very 
 sporadic.
 RFC2389 describes the FEAT command, which returns a multiline list of
 extension supported by the server. Note that the SIZE command is an
 extension, and not supported on all FTP servers. 

The file SIZE command is supported by almost every FTP server, even 
those that do not support the FEAT command.  Just use the SIZE method 
which should return the file size in SIZERESULT.  

The only bullet proof way is use CWD and DIR to get a directory 
listing, and parse it (many different formats) to get the file size.  
These commands are supported by all FTP servers. 

My high level TMagFTP component, available free to those that paid for 
the ICS SSL effort from the SSL download page, does all this 
transparently, using various techniques depending on the server 
capabilities.  

Angus
-- 
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] Using TPop3Cli

2005-07-30 Thread Дмитрий Андреев

Hello,
I try using TPop3Cli.
Code like this don`t working:

void MyProc()
{
...
Pop3Cli-Connect();
WaitForSingleObject(hEvent,Pop3TimeOut);
Pop3Cli-User();
WaitForSingleObject(hEvent,Pop3TimeOut);
Pop3Cli-Pass();
WaitForSingleObject(hEvent,Pop3TimeOut);
...
}

void __fastcall TForm1::Pop3Cli1RequestDone(TObject *Sender,
  TPop3Request RqType, WORD Error)
{
SetEvent(hEvent);
}

What I doing wrong?
Or how I will use TPop3Cli? Before I was using TSyncPop3Cli and code like this 
worked OK:
...
SyncPop3-ConnectSync();
SyncPop3-UserSync();
SyncPop3-PassSync();
...


Thank.
Best regards!



-- 
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] Using TPop3Cli

2005-07-30 Thread Wilfried Mestdagh
Hello Äìèòðèé,

You have to do next action in OnRequestDone. TPop3Cli is asynchronous
doing the work in background while your application can go on with other
things to do. Just do a switch (RqType) in the requestdone for the next
action. No need for all that sequentinal progrmming :)

---
Rgds, Wilfried
http://www.mestdagh.biz

Saturday, July 30, 2005, 17:01, Äìèòðèé Àíäðååâ wrote:


 Hello,
 I try using TPop3Cli.
 Code like this don`t working:

 void MyProc()
 {
 ...
Pop3Cli-Connect();
 WaitForSingleObject(hEvent,Pop3TimeOut);
Pop3Cli-User();
 WaitForSingleObject(hEvent,Pop3TimeOut);
Pop3Cli-Pass();
 WaitForSingleObject(hEvent,Pop3TimeOut);
 ...
 }

 void __fastcall TForm1::Pop3Cli1RequestDone(TObject *Sender,
   TPop3Request RqType, WORD Error)
 {
 SetEvent(hEvent);
 }

 What I doing wrong?
 Or how I will use TPop3Cli? Before I was using TSyncPop3Cli and code like 
 this worked OK:
 ...
SyncPop3-ConnectSync();
SyncPop3-UserSync();
SyncPop3-PassSync();
 ...


 Thank.
 Best regards!




-- 
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