[twsocket] problems with OnDataAvailable

2005-06-27 Thread Frank Wunderlich
Hi, i trying to send a record with TWSocket in delphi (code below). send/receive works well, but when i close the connection to the server. OnDataAvailable is fired and i get a message (from my showmessage) with strange signs. That means i cast the incoming data to my record an get something

[twsocket] FTPClient

2005-06-27 Thread Carlos Lalín
Hello, I use the component FTPCliente to download files from a server. I indicate the name of the file where appear the name of the files to download. After doing Ls, the file is empty when with another program FTP I see that there are files. To what can it owe? Thank you. Regards. Carlos. --

Re: [twsocket] FTPClient

2005-06-27 Thread Arno Garrels
Carlos Lalín wrote: After doing Ls, the file is empty I don't think it's possible *if the remote directory was not empty. You *may get an error in OnRequestDone if it was empty and file listing was therefore not sent. Arno Garrels Carlos Lalín wrote: Hello, I use the component FTPCliente

[twsocket] detecting disconnect from twsocketserver

2005-06-27 Thread Frank Wunderlich
Hi, i've trying to detect when a client is abnormal disconnected from the server (calling not the close-procedure). e.g. when the lan-cable is taken out. the client detects the disconnect,but the server don't call the OnClientDisconnect. How can i realize that? Greets frank -- Geschenkt: 3

Re: [twsocket] detecting disconnect from twsocketserver

2005-06-27 Thread Arno Garrels
Frank Wunderlich wrote: Hi, i've trying to detect when a client is abnormal disconnected from the server (calling not the close-procedure). e.g. when the lan-cable is taken out. the client detects the disconnect,but the server don't call the OnClientDisconnect. How can i realize that? You

Re: [twsocket] FTPClient

2005-06-27 Thread Carlos Lalín
I'm sorry but this is like that. The files are there but the file is empty. The conection doesn't produce error. Carlos. - Original Message - From: Arno Garrels [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Monday, June 27, 2005 1:18 PM Subject: Re: [twsocket]

Re: [twsocket] detecting disconnect from twsocketserver

2005-06-27 Thread Frank Wunderlich
You could check a 'last alive' time stamp stored in your client class. Cleanup the client after a timeout has elapsed. Use a single Timer to check all clients actually in the list in intervals. Arno Garrels sure but how can i check the clients are reachable? frank -- Weitersagen: GMX

Re: [twsocket] detecting disconnect from twsocketserver

2005-06-27 Thread Arno Garrels
Frank Wunderlich wrote: You could check a 'last alive' time stamp stored in your client class. Cleanup the client after a timeout has elapsed. Use a single Timer to check all clients actually in the list in intervals. Arno Garrels sure but how can i check the clients are reachable? Only

Re: [twsocket] detecting disconnect from twsocketserver

2005-06-27 Thread Wilfried Mestdagh
Hello Frank, e.g. when the lan-cable is taken out. the client detects the disconnect It will detect when it try to send something, in most cases it will NOT detect anything. Thats the nature of TCP. As Arno stated you have to maintain keep alive packets in your protocol if you want to be

Re: [twsocket] detecting disconnect from twsocketserver

2005-06-27 Thread Frank Wunderlich
You could check a 'last alive' time stamp stored in your client class. Cleanup the client after a timeout has elapsed. Use a single Timer to check all clients actually in the list in intervals. Arno Garrels is there a procedure to send something direct to the clients or do i need a 2nd

Re: [twsocket] detecting disconnect from twsocketserver

2005-06-27 Thread Arno Garrels
Frank Wunderlich wrote: You could check a 'last alive' time stamp stored in your client class. Cleanup the client after a timeout has elapsed. Use a single Timer to check all clients actually in the list in intervals. Arno Garrels is there a procedure to send something direct to the clients

Re: [twsocket] FTPClient

2005-06-27 Thread Carlos Lalín
The code is: FtpClient1.HostName := servername; FtpClient1.Port := 'ftp'; FtpClient1.Binary:= true; FtpClient1.HostDirName := '/'; FtpClient1.UserName := username; FtpClient1.Password := password; FtpClient1.LocalFileName :=

Re: [twsocket] FTPClient

2005-06-27 Thread Arno Garrels
What happens when you try this? The code is: FtpClient1.HostName := servername; FtpClient1.Port := 'ftp'; FtpClient1.HostDirName := '/'; FtpClient1.UserName := username; FtpClient1.Password := password; FtpClient1.LocalFileName :=

Re: [twsocket] FTPClient

2005-06-27 Thread Carlos Lalín
it Creates the first exception not connected but in my code: FtpClient1.Connect; if (FtpClient1.Connected) Then begin raise Exception.Create('Conected'); end; this too creates the exception 'Conected'. I don't know if this server requires login, I have used the configuration

Re: [twsocket] FTPClient

2005-06-27 Thread Arno Garrels
Carlos Lalín wrote: it Creates the first exception not connected but in my code: FtpClient1.Connect; if (FtpClient1.Connected) Then begin raise Exception.Create('Conected'); end; this too creates the exception 'Conected'. I don't know if this server requires login,

[twsocket] Assign event handler to manually created TStmpCli

2005-06-27 Thread Patrick Wong
Message-based component are 100% OK in a console mode application. There are a lot of console mode samples delivered with ICS (at least written in Delphi). Start looking by the most recent which are always the best. I want to step into the SmtpProt.pas and trace the variables value to see