Re[3]: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-18 Thread Wilfried Mestdagh
Hello Jack, > the first string in both cases. So it shouldn't be the server > sending the string twice. No but you close the connection. When you close TWSocket will empty his receiving buffer if there is yet still data in it. So I think that is what happening. --- Rgds, Wilfried http://www.mest

RE: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-18 Thread Bjørnar Nielsen
> ... Never call directly or indirectly ( ShowMessage, > MessageBox,...) from an event handler... Updating the caption of a label or the content of a memo could also make the message pump to be called. Regards Bjørnar -- To unsubscribe or change your settings for TWSocket mailing list plea

Re[2]: [twsocket] Threaded client?

2005-05-18 Thread Jack
Hello Francois, I'm not using a TDataModule but as I mentioned in my other email, I created an object to own the array of TWSocket objects. Now I have a new question that relates to the dependency of the main form. I'm reusing the sockets. So when a socket is disconnected, I assign a different IP

Re[2]: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-18 Thread Jack
Hello Wilfried, Sure. Below is my event handler code. Hope I'm doing something wrong, otherwise, it's really strange. TProxyChecker is the owner object of the TProxySocket object array. TProxySocket is derived from TWSocket. procedure TProxyChecker.WSocketDataAvailable(Sender: TObject; ErrCode: W

Re[2]: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-18 Thread Jack
Hello Francois, Thanks for the quick reply. No, I don't have any message handler of my own in my code. I create an object as the owner of an array of TWSocket objects. I assign the even handler of the TWSocket objects to a member function of that owner object and call ReceiveStr() in the OnDataAv

Re: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-18 Thread Francois PIETTE
Usually, when you receive the same data twice, it is because you called the message pump from one the ICS component event handler. Never call directly or indirectly ( ShowMessage, MessageBox,...) from an event handler that is called by hardware (a data packet comes from the network) unless you real

Re: [twsocket] [HELP]FTPServer within a service...

2005-05-18 Thread Francois PIETTE
> i'm wondering about the way to implement a FTP server > (with thread on GetProcessing) within a Windows Service ? > Does anyone has a sample ? The is a sample service in the demos. There is nothing very special to make a service using ICS. As long as there is a working message pump, ICS componen

Re: [twsocket] [HELP]FTPServer within a service...

2005-05-18 Thread Francois PIETTE
Use a thread with his own message within your service to put all ICS stuff and you'll get rid of anything else. -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: "Guillaume MAISON" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Wednesday, May 18, 2005 5:42 PM Su

Re: [twsocket] Receive result of the first ReceiveStr() call twice

2005-05-18 Thread Wilfried Mestdagh
Hello Jack, Can you show your OnDataAvailable handler ? Eventually download SocketSpy from 'user made' page and 'hang' it between client and server. Then you see exacly what is sent by server. --- Rgds, Wilfried http://www.mestdagh.biz Wednesday, May 18, 2005, 20:48, Jack wrote: > Hello Francoi

[twsocket] Receive result of the first ReceiveStr() call twice

2005-05-18 Thread Jack
Hello Francois and all, I'm using a TWSocket client in LineMode with LineEnd set to #13#10. I connect to a HTTP proxy server using CONNECT command. I then get a reply back from the HTTP proxy from ReceiveStr() Things look OK except that I am receiving the data from the first ReceiveStr() call twi

Re[2]: [twsocket] [HELP]FTPServer within a service...

2005-05-18 Thread Wilfried Mestdagh
Hello Guillaume, > Well... i'll try it for one of my services (i have several)... > i'll let you know ;) ok thx :) > i'll see especially on the problem i've mentioned about message pump... I have read your message concerning that, but did not fully indersteand it :( I have with this service cla

Re: [twsocket] TFTPClient upload problem

2005-05-18 Thread Woody \(TMW\)
From: "Guillaume MAISON" <[EMAIL PROTECTED]> > >Woody, i would suggest : > > FTP1.UserName := edUser.Text; > FTP1.Password := edPass.Text; > FTP1.HostName := edURL.Text; > try > if FTP1.Connect then begin > FTP1.TypeBinary; > FTP1.TypeSet; >... > >Binary and typeset are ftp commands

Re: [twsocket] [HELP]FTPServer within a service...

2005-05-18 Thread Guillaume MAISON
> Hello Guillaume, > > On my site you find a simple class to include in your GUI program so > that the same EXE can run as normal GUI and also as NT service without > any change. > > Advantage is that the service can make a tray icon when user log in, and > if you click on it the service can popup

Re: [twsocket] [HELP]FTPServer within a service...

2005-05-18 Thread Wilfried Mestdagh
Hello Guillaume, On my site you find a simple class to include in your GUI program so that the same EXE can run as normal GUI and also as NT service without any change. Advantage is that the service can make a tray icon when user log in, and if you click on it the service can popup his main form.

Re: [twsocket] [HELP]FTPServer within a service...

2005-05-18 Thread Guillaume MAISON
> > i'm wondering about the way to implement a FTP server (with thread on > > GetProcessing) within a Windows Service ? > > Any windows GUI application can be run as a service, provided it never > asks for any input from the user. I use a very simple real service > that runs the windows program, a

Re: [twsocket] TFTPClient upload problem

2005-05-18 Thread Guillaume MAISON
> Arno, > > I tried putting a call to TypeBinary just after filling in user,password and > host name but before opening the connection and it didn't change anything. > > FTP1.UserName := edUser.Text; > FTP1.Password := edPass.Text; > FTP1.HostName := edURL.Text; > FTP1.TypeBinary; > FTP1.

Re: [twsocket] TFTPClient upload problem

2005-05-18 Thread Woody \(TMW\)
From: "Arno Garrels" <[EMAIL PROTECTED]> >Woody (TMW) wrote: >> I am using the TFTPclient component in a small app I built for >> maintaining my web pages and files. For a long time, everything worked >> great. Well, I changed ISP's and so I had to move my web page over to the >> new location. Now,

Re: [twsocket] [HELP]FTPServer within a service...

2005-05-18 Thread Angus Robertson - Magenta Systems Ltd
> i'm wondering about the way to implement a FTP server (with thread on > GetProcessing) within a Windows Service ? Any windows GUI application can be run as a service, provided it never asks for any input from the user. I use a very simple real service that runs the windows program, and sends

Re: [twsocket] TFTPClient upload problem

2005-05-18 Thread Woody \(TMW\)
From: "Arno Garrels" <[EMAIL PROTECTED]> > >Do you explicitly call TypeBinary/TypeBinaryAsync? >It is not enough to set property Binary only. > No, I don't. When and where should I call this? Woody (TMW) -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.

Re: [twsocket] [HELP]FTPServer within a service...

2005-05-18 Thread Fastream Technologies
Hello Guillaume, We have an implementation of ICS FTP server within a service however it has no service GUI as its GUI is made of another process that communicates with the engine through XML/HTTP. Take a look at http://www.fastream.net/netfileserver.htm and if you want to design something simi

[twsocket] [HELP]FTPServer within a service...

2005-05-18 Thread Guillaume MAISON
Hi everyone, i'm wondering about the way to implement a FTP server (with thread on GetProcessing) within a Windows Service ? Does anyone has a sample ? knowing that i'd like ot have a form with a memo for log messages... thanks a lot for your answer ! Guillaume MAISON - Guillaume MAISON -

Re: [twsocket] Insert image into email body

2005-05-18 Thread Arno Garrels
[EMAIL PROTECTED] wrote: > Hello, > > I've a little problem when sending an e-mail with images. > Ii'want create an e-mail with an image into the body of message, like > thunderbird > when you use menu insert -> image. > I've tried htmlsmtp.EmailImages.text with ContentType := smtpHtml, but > whe

[twsocket] Insert image into email body

2005-05-18 Thread marco . demori
Hello, I've a little problem when sending an e-mail with images. Ii'want create an e-mail with an image into the body of message, like thunderbird when you use menu insert -> image. I've tried htmlsmtp.EmailImages.text with ContentType := smtpHtml, but when receive the message the image is an att