AS>> > Current manner of reporting local errors is to set code 550 with an explaining message AS>>> and call TriggerRequestDone. But I find it very confusing: for example, when trying to AS>>> GET some file or directory listing we could receive "true FTP response" 550 if the AS>>> requested file doesn't exist (so we should give up) as well as "ICS response" if AS>>> connection couldn't be established (so we should retry) or there was error creating local AS>>> file stream (so we should check HDD free space). And there's no way to distinguish AS>>> these cases (except checking FLastResponse string, but I consider it rather unconvenient).

AS>>> So I think something is needed to be done to differentiate local problems of remote ones. AS>>> I'd prefer changing 550 code to some another value unused by FTP servers (maybe even AS>>> over 600 to avoid intersections for sure) but the ICS policy is NOT BREAK existing AS>>> code, so maybe some flag like FLocalErrorHappened: Boolean will solve the problem?

AG>> If a workaround is needed then IMO a field "FLastLocalError" of type
AG>> LongWord or Integer could receive a meaningful error code and a method
AG>> GetLastLocalError could return and reset the value back to 0?

AS> So, what will be your decision?
AS> I wouldn't hurry you, but I have a buggy project based on old FTP components
AS> and wish to rebuild it with ICS.

Arno's suggestion looks good and wouldn't break any existing code.
It is probably not trivial to record the "local error code" everywhere in the code. The inital design was to produce an error code which is compatible with the RFC defining FTP protocol (3 digits error code, probably what you named "true FTP response") so that any application has no need for special code to handle local errors. As far as I remember, you are the first to request the special handling for local error codes.

The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)

To unsubscribe or change your settings for TWSocket mailing list
please goto
Visit our website at

Reply via email to