Francois PIETTE wrote: > I think the proxy implementation should be as transparent as possible.
Agreed and also should be as simple as possible to detect, log and display proxy errors, especially since there are now two and even three different proxy server types supported (FTP client). Socks and HTTP both provide OnError-events however with slightly different signatures. HTTP is aware of a last response message which is the first line of the HTTP response, socks is not. Currently the only way to get an error message from socks is by assigning its OnSocksError event, also its error code constants are not globaly available since declared in the implementation section and there is no function available to get a message from socks error codes :( They both emit custom error codes, socks starting at 20000 HTTP at 21000 so they would neither conflict with winsock error numbers nor with common protocol status codes. Error codes with HTTP are in the range 21000 to 21000 + max. HTTP status code (599). IMO in the FTP client it where enough if properties LastResponse and ErrorMessage would contain a readably proxy error message in case something went wrong with a proxy, however with socks "#20xxx is not a winsock error" is displayed everywhere with socks errors. I cannot ship something like that to my customer. > Of course with a proxy in the middle, we have two levels of errors > and we have only one to return to the application. > Without having thinked about it too much, I would say that > OnSessionConnected and OnSessionClosed should use the actual error > code, no matter where it was generated (proxy or distant system). And > since we need a second layer of error, probably a proxy specific > error should be reported, if any, in a new property. What do you > think ? I think that TWSocket should provide a property ProxyLastResponse, also there should be a method or global function to get an error message from a TWSocket error code whether it comes from winsock, a proxy or some other custom places. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be