[twsocket] Telnet

2005-05-19 Thread Arnoldo - Optextil
I'm using ICS - TWSocket and I wrote a server that listen on port, waiting a connection. A client telnet connect to this IP/port and the server execute another application to receive this connection. The server is a single receive of connections. Question 1 = Did you already make something similar

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

2005-05-19 Thread Jack
I celebrated a little too early. I am getting this problem again in further testing after I changed Close() to CloseDelayed(); The difference is, I'm not getting result of the first ReceiveStr() twice. Instead, I get the result of the second ReceiveStr() twice. I think this is because CloseDelayed(

Re: [twsocket] Connection not closed in WebServer with IE

2005-05-19 Thread Bruno Sonnino
François: I replaced your Time function with this one, now when you try the time function in IE, the progressbar stays there and the client is not disconnected (you can see the client connected in the server panel). In FireFox this doesn't happen: procedure TWebServForm.CreateVirtualDocument_Time

Re: [twsocket] Connection not closed in WebServer with IE

2005-05-19 Thread Francois PIETTE
I don't know the context of this code. I find strange to have a local variable "Flags". Have you looked at the WebServ delo provided with ICS ? See TWebServForm.CreateVirtualDocument_Time as an example of AnswerString use. Put your code into that sample program. -- [EMAIL PROTECTED] http://www.over

Re: [twsocket] Connection not closed in WebServer with IE

2005-05-19 Thread Bruno Sonnino
Francois: Yes, I am. The full code (it has been cut from my last message) is: var Flags: THttpGetFlag; i : Integer; Body : String; Header : String; begin Flags := hgWillSendMySelf; Body := '' + '' + 'Pagina de teste ' + '' + #13#10 + ''; for

Re: [twsocket] [HELP] FTP server random client deconnection

2005-05-19 Thread Guillaume MAISON
> hi everyone, > > still working on my ftp service server. [...snip...] > The exceptions are triggered because the Client used within the thread is nil. > what i don't understand is why, although i set delayedsend to true, > the ftp server begins to open the data connection and says the file is s

Re: [twsocket] Connection not closed in WebServer with IE

2005-05-19 Thread Francois PIETTE
> There is no need to - if you take a look at AnswerString in HTTPSrv, you > have: But you are not using AnswerString. Are you ? -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: "Bruno Sonnino" <[EMAIL PROTECTED]> To: Sent: Thursday, May 19, 2005 6:00 PM Subject:

[twsocket] [HELP] FTP server random client deconnection

2005-05-19 Thread Guillaume MAISON
hi everyone, still working on my ftp service server. i have a strange behavior : i use my ftp server to build "on the fly" a file made of int64 if the file ='IMAGES'. if this condition is met, i use the thread process as mentioned in previous mail in order not to block the main thread and send t

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

2005-05-19 Thread Francois PIETTE
> Attempt to gracefully close the socket. If there is still some > data waiting in the buffers it will try to send it. ***Do not use > Close from within any TWSocket events, instead use CloseDelayed.*** You even have to call Shutdown(1) to really gracefully close the socket. Calling Shutdown will

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

2005-05-19 Thread Francois PIETTE
> > I do not agree. Those operations translate to sending a > > message to the Windows control. There is no call to the message pump. > > If you override WndProc of the form, and you place a breakpoint inside your > custom WndProc. Then you can see that it is called imidiately when you > update a c

Re: [twsocket] Connection not closed in WebServer with IE

2005-05-19 Thread Bruno Sonnino
There is no need to - if you take a look at AnswerString in HTTPSrv, you have: procedure THttpConnection.AnswerString( var Flags: THttpGetFlag; const Status : String; { if empty, default to '200 OK' } const ContType : String; { if empty, default to 'text/html'

Re: [twsocket] Connection not closed in WebServer with IE

2005-05-19 Thread Fastream Technologies
You forgot to set the "Content-Length". Regards, SZ - Original Message - From: "Bruno Sonnino" <[EMAIL PROTECTED]> To: Sent: Thursday, May 19, 2005 5:30 PM Subject: [twsocket] Connection not closed in WebServer with IE I am using a program based on the WebServer demo, where I generate m

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

2005-05-19 Thread Bjørnar Nielsen
> I do not agree. Those operations translate to sending a > message to the Windows control. There is no call to the message pump. If you override WndProc of the form, and you place a breakpoint inside your custom WndProc. Then you can see that it is called imidiately when you update a caption of

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

2005-05-19 Thread Jack
Francois, thanks! This fixed the problem! It's actually in the FAQ: - CloseDelayed Is in most cases the preferred way. It will post a message to itself to close the TWSocket. This means that the socket closure is done outside the code that calls the CloseDelayed, meaning a while later. The messag

[twsocket] Connection not closed in WebServer with IE

2005-05-19 Thread Bruno Sonnino
I am using a program based on the WebServer demo, where I generate my pages. When using IE as the client (this doesn't happen with FireFox), the connection is not closed after the page is sent, and the progressbar doesn't close in IE. Did anybody see something similar? Is there any way to avoid th

Re: [twsocket] [FTP Client] Mask on files

2005-05-19 Thread Fastream Technologies
Hello, The mget command of DOS ftp does work the same way as you described. There is no easy way. Regards, SZ - Original Message - From: "Artem Antonov" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Thursday, May 19, 2005 2:21 PM Subject: [twsocket] [FTP Client] Mask on files Hel

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

2005-05-19 Thread Francois Piette
> > ... 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. I do not agree. Those operations translate to sending a message to the Windows contro

[twsocket] [FTP Client] Mask on files

2005-05-19 Thread Artem Antonov
Hello, does anybody know how I can select only files with set mask (for example, *.doc) and all dir's from FTP directory? If I set: FTPClient.HostFileName = "*.doc", I can get only files with this mask without dir's. Is there any way to get file with mask and dir's, or I should 1) Get files with

Re: [twsocket] [FTPClient] Rename File

2005-05-19 Thread Artem Antonov
On Thu, 19 May 2005 13:50:53 +0400 "Artem Antonov" <[EMAIL PROTECTED]> wrote: Hello, how I can rename file, i.e. where I should set _old_ and _new_ file names? Thanks. I have done it already. Thanks. Best regards, Artem Antonov. -- To unsubscribe or change your settings for TWSocket mailing list

[twsocket] [FTPClient] Rename File

2005-05-19 Thread Artem Antonov
Hello, how I can rename file, i.e. where I should set _old_ and _new_ file names? Thanks. Best regards, Artem Antonov. -- 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: Re[2]: [twsocket] Threaded client?

2005-05-19 Thread Arno Garrels
Jack wrote: > 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 > disconnec

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

2005-05-19 Thread Francois Piette
Use CloseDelayed instead of Close. -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: "Jack" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Thursday, May 19, 2005 12:35 AM Subject: Re[2]: [twsocket] Receive result of the first ReceiveStr() call twice > Hello W

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

2005-05-19 Thread Francois Piette
> No, I don't have any message handler of my own in my code. I'm not talking about "message handler of your own". I'm talking about calling the message pump directly or indirectly from an event handler. It's enough to put a ShowMessage somewhere or to call ProcessMessages to get the kind of prob

Re[3]: [twsocket] Threaded client?

2005-05-19 Thread Wilfried Mestdagh
Hello Jack, You need a hidden window in hour object where you can post messages to. This is some copy/past what I'm just doing :) // inconstructor you create a window and give the wndProc functio addr // (see below) constructor TVehicle.Create(const FileName: string); begin inherited; FHand

Re: Re[2]: [twsocket] Threaded client?

2005-05-19 Thread Francois Piette
> I know I can create a hidden > window in the owner object but I would > avoid doing that if there is an easier way. No easier way that I'm aware of. -- [EMAIL PROTECTED] http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.