[twsocket] Socket - streams
Hi, Does twSocket has a method to use streams I want to recieve some data in a TStringStream Now, I'm using CliSocket.ReceiveStr to recieve data and put this in a buffer until all data is read I wonder if I can read all data in one piece by using streams? Thanks for any suggestions Werner -- 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: [twsocket] Socket - streams
Hello Werner, If you data has a terminating character then you can use lineMode. Then OnDataAvailable will only fire when thes character(s) are received and you have all your data at ones. If not it will arrive in many chunck, or datapackets can even be concatenatied. Thats nature of TCP. > Now, I'm using CliSocket.ReceiveStr to recieve data and put this > in a buffer until all data is read That is the right way to do if you dont have terminating characters. Better is to use Receive, then you save an extra copy to a string. --- Rgds, Wilfried [TeamICS] http://www.mestdagh.biz Wednesday, October 19, 2005, 10:18, Werner wrote: > Hi, > Does twSocket has a method to use streams > I want to recieve some data in a TStringStream > Now, I'm using CliSocket.ReceiveStr to recieve data and put this in a buffer > until all data is read > I wonder if I can read all data in one piece by using streams? > Thanks for any suggestions > Werner -- 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: [twsocket] Socket - streams
> Does twSocket has a method to use streams > I want to recieve some data in a TStringStream > I wonder if I can read all data in one piece by using streams? It is not the component that read data, it is your application that does it from the OnDataAvailable event handler. > Now, I'm using CliSocket.ReceiveStr to recieve data and put this in a buffer > until all data is read That is OK but if you want speed, avoid using longstring and therefore ReceiveStr. Use a simple array of char for your buffer or a dynamically allocated buffer that you allocate only once. Use a size adapted to your need. If you don't know what size to use, use 2KB as a starting point. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) http://www.overbyte.be -- 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: [twsocket] Do You have the same problem with this url and HttpTst ?
Hello: I have confirmed that this URL is valid and returns a proper HTTP header with a status code of 200, but at the moment I do not have access to HttpTst to reproduce your problem. I'll check it in a few hours and let you know. mcdropzone:~ dz$ telnet liinwww.ira.uka.de 80 Trying 141.3.56.96... Connected to i90www2.liin.uni-karlsruhe.de. Escape character is '^]'. GET /bibliography/Ai/agents.html HTTP/1.0 HTTP/1.1 200 OK Date: Wed, 19 Oct 2005 09:12:12 GMT Server: Apache/1.3.33 (Debian GNU/Linux) Cache-Control: max-age=64800 Expires: Thu, 20 Oct 2005 03:12:12 GMT Last-Modified: Thu, 29 Sep 2005 08:35:41 GMT ETag: "3bb23-1fc3-433ba75d" Accept-Ranges: bytes Content-Length: 8131 Connection: close Content-Type: text/html dZ. -- DZ-Jay [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html On Oct 18, 2005, at 21:20, Bruno Mannina wrote: > Hi All, > > I want to GET this url > http://liinwww.ira.uka.de/bibliography/Ai/agents.html > but HttpTst program returns me > Error 400 Bad Request ??!! FireFox or I.E. programs reply me > StatusCode = > 200 !!! > > Can you try or give me a solution ?? > > Sincerely, > Bruno > > -- > 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 > -- 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: [twsocket] Socket - TimeOut
Thank, Thanks, I'll check the receive function An other Q. about TimeOut After connect to the server, I send a string 'SENDDATA' In OnDataAvailable, i check for incoming data, but when no data arives, then I want to close the connection. Now I'm using a separate timer to check this. Is there an other way to do this, so far I've red that after the connect, onDataAvailable will fired direct, but is this when also when no data comes in? Thanks Werner - Oorspronkelijk bericht - Van: "Wilfried Mestdagh" <[EMAIL PROTECTED]> Aan: "ICS support mailing" Verzonden: woensdag, oktober 19, 2005 10:46 Onderwerp: Re: [twsocket] Socket - streams > Hello Werner, > > If you data has a terminating character then you can use lineMode. Then > OnDataAvailable will only fire when thes character(s) are received and > you have all your data at ones. > > If not it will arrive in many chunck, or datapackets can even be > concatenatied. Thats nature of TCP. > > > Now, I'm using CliSocket.ReceiveStr to recieve data and put this > > in a buffer until all data is read > > That is the right way to do if you dont have terminating characters. > Better is to use Receive, then you save an extra copy to a string. > > --- > Rgds, Wilfried [TeamICS] > http://www.mestdagh.biz > > Wednesday, October 19, 2005, 10:18, Werner wrote: > > > Hi, > > > Does twSocket has a method to use streams > > I want to recieve some data in a TStringStream > > > Now, I'm using CliSocket.ReceiveStr to recieve data and put this in a buffer until all data is read > > I wonder if I can read all data in one piece by using streams? > > > Thanks for any suggestions > > Werner > > -- > 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 > > -- 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: [twsocket] Socket - TimeOut
Hello Werner, > so far I've red that after the connect, > onDataAvailable will fired direct, but is this when also when no data comes > in? That was the case on NT4 and on W2K, never checked it on XP. But I should nor rely on this. Just send your data in OnSessionConnected and set a timer. When OnDataAvailable fires with data you destroy the timer. When Timer expire you close the connection. Or even better: create the timer when you connect, then yoiu have timeout for the whole cycle. Note that timers are not unlimited resources. --- Rgds, Wilfried [TeamICS] http://www.mestdagh.biz Wednesday, October 19, 2005, 13:05, Werner wrote: > Thank, > Thanks, I'll check the receive function > An other Q. about TimeOut > After connect to the server, I send a string 'SENDDATA' > In OnDataAvailable, i check for incoming data, but when no data arives, then > I want to close the connection. > Now I'm using a separate timer to check this. > Is there an other way to do this, so far I've red that after the connect, > onDataAvailable will fired direct, but is this when also when no data comes > in? > Thanks > Werner > - Oorspronkelijk bericht - > Van: "Wilfried Mestdagh" <[EMAIL PROTECTED]> > Aan: "ICS support mailing" > Verzonden: woensdag, oktober 19, 2005 10:46 > Onderwerp: Re: [twsocket] Socket - streams >> Hello Werner, >> >> If you data has a terminating character then you can use lineMode. Then >> OnDataAvailable will only fire when thes character(s) are received and >> you have all your data at ones. >> >> If not it will arrive in many chunck, or datapackets can even be >> concatenatied. Thats nature of TCP. >> >> > Now, I'm using CliSocket.ReceiveStr to recieve data and put this >> > in a buffer until all data is read >> >> That is the right way to do if you dont have terminating characters. >> Better is to use Receive, then you save an extra copy to a string. >> >> --- >> Rgds, Wilfried [TeamICS] >> http://www.mestdagh.biz >> >> Wednesday, October 19, 2005, 10:18, Werner wrote: >> >> > Hi, >> >> > Does twSocket has a method to use streams >> > I want to recieve some data in a TStringStream >> >> > Now, I'm using CliSocket.ReceiveStr to recieve data and put this in a > buffer until all data is read >> > I wonder if I can read all data in one piece by using streams? >> >> > Thanks for any suggestions >> > Werner >> >> -- >> 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 >> >> -- 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
[twsocket] Do You have the same problem with this url and HttpTst ?
Hello: I just tested that URL with the HttpTst and it seems to work fine: Not using proxy cmd> GET /bibliography/Ai/agents.html HTTP/1.0 cmd> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* cmd> Connection: Keep-Alive cmd> Accept-Language: en, fr cmd> User-Agent: Mozilla/3.0 (compatible) cmd> Host: liinwww.ira.uka.de cmd> text/html => agents.html Location = http://liinwww.ira.uka.de/bibliography/Ai/agents.html URL = http://liinwww.ira.uka.de/bibliography/Ai/agents.html Document = agents.html RequestDone, no error. Status =200 StatusCode = 200 Can you post the output you are getting from the program? Also, are you using the latest version of ICS and the HttpTst program? If not, which version are you using? Thank you, dZ. -- God is real -- except when declared as an integer; and infinite when divided by zero. DZ-Jay [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- 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
[twsocket] OT: Open source model
Hello Francois, I wonder how your open-source business model is going? I mean financially is it satisfying? If I can convince me and my partner, we may consider releasing the source code of our web/ftp server as well (http://www.fastream.com/netfileserver.htm), that's why I am asking. Best Regards, SubZ -- 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
[twsocket] AN: Google Translation Interface
Hello all I made a beautiful interface for the Google language translation service (using HTTPcli). It is free, you can download and use it for free. http://www.mcrenox.com.ar/downloads/gtrans.exe I would like to hear for comments and suggestions. Thanks, David Aguirre Grazio www.mcrenox.com.ar -- 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: [twsocket] OT: Open source model
Fastream Technologies wrote: > Hello Francois, > > I wonder how your open-source business model is going? At first ICS is not open source. > I mean financially > is it satisfying? If I can convince me and my partner, we may consider > releasing the source code of our web/ftp server as well > (http://www.fastream.com/netfileserver.htm), that's why I am asking. Code that is published as/in ICS was mostly contributed because the authors would have written it anyway and they decided to give it away as freeware under the license of ICS. The principle is simple, if you use ICS in your applications, you should make your own improvements or bugfixes public. If you do not it's your turn, but then you are not belonging to the people who are interested in moving this project forward. (not everything in the world is a business model!) > > Best Regards, > > SubZ -- 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: [twsocket] OT: Open source model
Arno Garrels wrote: > Code that is published as/in ICS was mostly contributed because the authors > would have written it anyway and they decided to give it away as freeware > under the license of ICS. The principle is simple, if you use ICS in your > applications, you should make your own improvements or bugfixes public. > If you do not it's your turn, but then you are not belonging to the > people who are interested in moving this project forward. > (not everything in the world is a business model!) Arno, Although I agree with your philosophy, I believe that he was referring to Francois himself releasing ICS as "open source". Although I'm sure that only Francois can answer that question, I think that it is appropriate to make a few important distinctions: 1. ICS is not "open source" as in Open Source Software, i.e. it does not adhere to any of the OSS licenses. It is "freeware" (or more specific, "postcard-ware" :), that Francois happens to offer with source. He reserves the right at any time to stop this and to prevent anybody else from distributing the source. As a matter of fact, Francois does not currently give permission to distribute ICS source by anybody except him. 2. Francois does not generate money from ICS; as far as I know, he originally made money from the MidWare components, which were the commercial, industrial-strength components. He gave ICS away in return for a postcard, but he wasn't expecting to make a business model out of it. dZ. -- 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: [twsocket] AN: Google Translation Interface
Hello David, Looks very nice :) Works fine in XP, but gives AV's in NT4. Did not tryed on other OS. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Wednesday, October 19, 2005, 19:06, David A. G. wrote: > Hello all > I made a beautiful interface for the Google language translation service > (using HTTPcli). > It is free, you can download and use it for free. > http://www.mcrenox.com.ar/downloads/gtrans.exe > I would like to hear for comments and suggestions. > Thanks, > David Aguirre Grazio > www.mcrenox.com.ar -- 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: [twsocket] Do You have the same problem with this url and HttpTst ?
I get the same result as you. And I found why. And of course I fixed it. Here is the fix (in red bold): procedure THttpCli.SendRequest(const Method, Version: String); ... if (FTargetPort = '80') or (FTargetPort = '') then Headers.Add('Host: ' + FTargetHost) else Headers.Add('Host: ' + FTargetHost + ':' + FTargetPort); -- [EMAIL PROTECTED] The author for the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be - Original Message - From: "Bruno Mannina" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Wednesday, October 19, 2005 3:20 AM Subject: [twsocket] Do You have the same problem with this url and HttpTst ? > Hi All, > > I want to GET this url http://liinwww.ira.uka.de/bibliography/Ai/agents.html > but HttpTst program returns me > Error 400 Bad Request ??!! FireFox or I.E. programs reply me StatusCode = > 200 !!! > > Can you try or give me a solution ?? > > Sincerely, > Bruno > > -- > 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 -- 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: [twsocket] Do You have the same problem with this url and HttpTst ?
> I just tested that URL with the HttpTst and it seems to work fine: Well, not here. The problem was that the "host" header line was malformed. The port is empty but the colon delimiter is there. Here is the fix (in red bold): procedure THttpCli.SendRequest(const Method, Version: String); ... if (FTargetPort = '80') or (FTargetPort = '') then Headers.Add('Host: ' + FTargetHost) else Headers.Add('Host: ' + FTargetHost + ':' + FTargetPort); Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] The author for the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be - Original Message - From: "DZ-Jay" <[EMAIL PROTECTED]> To: Sent: Wednesday, October 19, 2005 5:24 PM Subject: [twsocket] Do You have the same problem with this url and HttpTst ? > Hello: > I just tested that URL with the HttpTst and it seems to work fine: > > Not using proxy > cmd> GET /bibliography/Ai/agents.html HTTP/1.0 > cmd> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* > cmd> Connection: Keep-Alive > cmd> Accept-Language: en, fr > cmd> User-Agent: Mozilla/3.0 (compatible) > cmd> Host: liinwww.ira.uka.de > cmd> > text/html => agents.html > Location = http://liinwww.ira.uka.de/bibliography/Ai/agents.html > URL = http://liinwww.ira.uka.de/bibliography/Ai/agents.html > Document = agents.html > RequestDone, no error. Status =200 > StatusCode = 200 > > > Can you post the output you are getting from the program? Also, are > you using the latest version of ICS and the HttpTst program? If not, > which version are you using? > > Thank you, > dZ. > > -- > God is real -- except when declared as an integer; and infinite when > divided by zero. > > DZ-Jay [TeamICS] > http://www.overbyte.be/eng/overbyte/teamics.html > > > -- > 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 -- 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: [twsocket] OT: Open source model
> I wonder how your open-source business model is going? Well, thank you. My freeware (This is slightly different than OpenSource) make me known and I get business because I am known. With the internet, the world is a village. -- [EMAIL PROTECTED] http://www.overbyte.be -- 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: [twsocket] Do You have the same problem with this url and HttpTst ?
Hi Francois, Well, well, well it's Work fine now :) even my program !!! Thank's a lot Bruno - Original Message - From: Francois PIETTE To: ICS support mailing Sent: Wednesday, October 19, 2005 8:26 PM Subject: Re: [twsocket] Do You have the same problem with this url and HttpTst ? I get the same result as you. And I found why. And of course I fixed it. Here is the fix (in red bold): procedure THttpCli.SendRequest(const Method, Version: String); ... if (FTargetPort = '80') or (FTargetPort = '') then Headers.Add('Host: ' + FTargetHost) else Headers.Add('Host: ' + FTargetHost + ':' + FTargetPort); -- [EMAIL PROTECTED] The author for the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be - Original Message - From: "Bruno Mannina" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Wednesday, October 19, 2005 3:20 AM Subject: [twsocket] Do You have the same problem with this url and HttpTst ? > Hi All, > > I want to GET this url http://liinwww.ira.uka.de/bibliography/Ai/agents.html > but HttpTst program returns me > Error 400 Bad Request ??!! FireFox or I.E. programs reply me StatusCode = > 200 !!! > > Can you try or give me a solution ?? > > Sincerely, > Bruno > > -- > 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 -- 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: [twsocket] AN: Google Translation Interface
David A. G. wrote: > Hello all > > I made a beautiful interface for the Google language translation service > (using HTTPcli). > It is free, you can download and use it for free. > > http://www.mcrenox.com.ar/downloads/gtrans.exe > Doesn't run on Win2k... :( dZ. -- 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
[twsocket] Async http, close or closeAsync?
Hello all, I'm using httpcli in async mode. Since I'm using http 1.0, most likely the server will disconnect when it's done sending the data. I just want to be sure so I plan to disconnect in HttpCliRequestDone event handler. Should I use httpcli.Close() or httpcli.CloseAsync()? Thanks. -- Best regards, Jack -- 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
[twsocket] Disconnect a client from FTPServer...
Hi, This is my first post to the list so I hope I do it right. My question is as follows: I'm trying to code a simple FTPServer using the ICS Demo as a base. However, I want to be able to disconnect a user via the server. I see the "FtpServer1.Disconnect()" method but I don't know how to use it. Could someone please explain how I would go about using this, for example, in an onClick method of a button. Thanks in Advance. Regards, Scott -- 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: [twsocket] Async http, close or closeAsync?
> I'm using httpcli in async mode. > Should I use httpcli.Close() or httpcli.CloseAsync()? CloseAsync -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) http://www.overbyte.be - Original Message - From: "Jack" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Thursday, October 20, 2005 12:22 AM Subject: [twsocket] Async http, close or closeAsync? > Hello all, > > I'm using httpcli in async mode. Since I'm using http 1.0, > most likely the server will disconnect when it's done sending > the data. I just want to be sure so I plan to disconnect in > HttpCliRequestDone event handler. Should I use httpcli.Close() or > httpcli.CloseAsync()? > > Thanks. > -- > Best regards, > Jack > > -- > 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 -- 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