[twsocket] socket programming tcp/udp primer question

2005-12-17 Thread lame.one
I recently read the tcp/udp primer under the overbyte.be support section and the tcp data fragmented packet example using the text string Hello caught my attention because that is something i always wondered about in socket programs. The fact that the data can be split up into multiple packets

Re: [twsocket] socket programming tcp/udp primer question

2005-12-17 Thread Fastream Technologies
Unless you are using UDP and instead using TCP, you do not need to worry about fragmentation: MS TCP layer would handle it and Winsock will just fill your buffer--the size you want. There is one exception: the last packet. You should check for connection termination and packet sizes of smaller

Re: [twsocket] socket programming tcp/udp primer question

2005-12-17 Thread Francois PIETTE
strictly through the protocol implementation) how can I force WSocket's OnDataAvailable event to queue the data until it's assembled into one large chunk so i can then process it as if it all arrived that way instead of split up. TWSocket will do that for you in the case where your chunks

Re: [twsocket] RES: Ftp Client with proxie

2005-12-17 Thread Francois PIETTE
Ok, I see this on source code, but the problem is that my proxy requires authentication, and are different from ftp connection, how I send the user and password to proxie? What kind of proxy do you have ? Ask the system administrator (or search into the proxy user manual) how you would have

Re: [twsocket] Exception with HTTP component

2005-12-17 Thread Francois PIETTE
I got a exception with HttpCli1 : 'HTTP component HttpCli1 is busy' after several hours off good work ; - i use httpcli every second to post data and wait for response. (PostAsync and RequestDone methods); it arrives on only 1 computer but not on others. Have you an idea ? The exception

[twsocket] How to send an Image over the network using wSocket

2005-12-17 Thread Persian Patient
Hello , I have to use ICS to send some images to another computer over the network . now I have to ask how can I send stream using wSocket from a side and how can I receive stream on another side ? please take a look at this sample code , I am using this technic to make stream of an

Re: [twsocket] How to send an Image over the network using wSocket

2005-12-17 Thread Francois PIETTE
You have to better define what you mean by stream. For example, I don't know if you think about a TStream component or some kind of audio or video streaming. Define your requirement a little bit more if you want to be helped. In french we have an expression which says: help yourself and heaven

[twsocket] HTTPCLI Close

2005-12-17 Thread Me
Hi What happens when THTTPCLI.close procedure is called? Does it always call OnRequestDone event? Ann -- 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] HTTPCLI Close

2005-12-17 Thread Fastream Technologies
In my code, yes it does. Regards, SZ - Original Message - From: Me [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Saturday, December 17, 2005 2:17 PM Subject: [twsocket] HTTPCLI Close Hi What happens when THTTPCLI.close procedure is called? Does it always

Re: [twsocket] HTTPCLI Close

2005-12-17 Thread Me
In your code? So do I have to implement something so it would be true? Wiadomość Oryginalna Od: Fastream Technologies [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Sat, 17 Dec 2005 14:21:04 +0200 Temat: Re: [twsocket] HTTPCLI Close In my code, yes it does.

[twsocket] HTTPCLI TimeOut implementation help : -(

2005-12-17 Thread Me
Hi Im trying to make basic proxy checker based on THTTPCli component, but have problem with timeout. Would like to have 2 timeouts - connection timeout and verification timeout. So i made something like this... Made one timer that is being run before .GetAsync (connection timeout) and one in

Re: [twsocket] HTTPCLI Close

2005-12-17 Thread Fastream Technologies
Why don't you use onsessionclosed. Not sure but it should work for your close problem. OnRequestdone should also be called for me. Regards, SZ - Original Message - From: Me [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Saturday, December 17, 2005 2:33 PM Subject:

Re: [twsocket] HTTPCLI TimeOut implementation help :-(

2005-12-17 Thread Francois PIETTE
Only one timer is enough for all your timeouts. You could implement this way: You timer would trigger each 10 seconds (or any other interval you like). Your timer event handler will check a list of timeout actions. Each timeout action could be a time value to check against current time and an

[twsocket] HTTPCLI GETASYNC and SLEEP?

2005-12-17 Thread Me
HI Thanks everybody for help with previous problems, but now i got another :-) I hope it will be the last one. The problem is that i wouldlike to implement retries on HTTPCLI but so it would wait some time before retrying... Sleep doesnt seems to be the right choice because it ruins

Re: [twsocket] HTTPCLI GETASYNC and SLEEP?

2005-12-17 Thread Fastream Technologies
Why not use a timer and launch the second request on OnTimer? You would need to start the time (Enabled := true;) in OnSessionClosed. Regards, SZ - Original Message - From: Me [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Saturday, December 17, 2005 5:00 PM

Re: [twsocket] HTTPCLI GETASYNC and SLEEP?

2005-12-17 Thread Francois PIETTE
I wouldlike to implement retries on HTTPCLI but so it would wait some time before retrying... Sleep doesnt seems to be the right choice because it ruins GetAsync... Any way to make a async sleep for getasync? You never wait with ICS since it is asynchronous. You can implement retries using a

Re: [twsocket] HTTPCLI GETASYNC and SLEEP?

2005-12-17 Thread Me
Because its semi-multithreaded application. I got 20 HTTPClient components. Wiadomość Oryginalna Od: Fastream Technologies [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Sat, 17 Dec 2005 17:26:49 +0200 Temat: Re: [twsocket] HTTPCLI GETASYNC and SLEEP? Why not use

Re: [twsocket] HTTPCLI GETASYNC and SLEEP?

2005-12-17 Thread Me
Wiadomość Oryginalna Od: Francois PIETTE [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Sat, 17 Dec 2005 16:25:56 +0100 Temat: Re: [twsocket] HTTPCLI GETASYNC and SLEEP? I wouldlike to implement retries on HTTPCLI but so it would wait some time before

Re: [twsocket] HTTPCLI GETASYNC and SLEEP?

2005-12-17 Thread Arno Garrels
Me wrote: Wiadomosc Oryginalna Od: Francois PIETTE [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Sat, 17 Dec 2005 16:25:56 +0100 Temat: Re: [twsocket] HTTPCLI GETASYNC and SLEEP? I wouldlike to implement retries on HTTPCLI but so it would wait some time

Re: [twsocket] HTTPCLI GETASYNC and SLEEP?

2005-12-17 Thread Francois PIETTE
Ok but... i got 20 HTTPCli components working as multithreading... With ICS, you don't need to use multithreading to have 20 HTTP components running in parrallel doing different things ! Use multithreading for your blocking processing, if any. It will be much easier to develop and debug. If

Re: [twsocket] HTTPCLI GETASYNC and SLEEP?

2005-12-17 Thread Me
Wiadomość Oryginalna Od: Francois PIETTE [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Sat, 17 Dec 2005 17:07:26 +0100 Temat: Re: [twsocket] HTTPCLI GETASYNC and SLEEP? Ok but... i got 20 HTTPCli components working as multithreading. .. With ICS, you don't

[twsocket] HttpCli and Socket operation on non- socket

2005-12-17 Thread Me
Ok. I made basic proxy checker... 5xHTTPCli that tries to connect through one of the proxies (with GetAsync method) from list and analizes if result is ok. But... I noticed that the more HTTPCli i use the more frequent Socket operation on non-socket error occures. Why is that? What is this

Re: [twsocket] HTTPCLI GETASYNC and SLEEP?

2005-12-17 Thread Francois PIETTE
Its a proxy checker... it has to have some threds (few async components) so i wouldnt check whole day :] Sorry, I don't understand what you mean. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be -- To unsubscribe or

Re: [twsocket] HttpCli and Socket operation on non-socket

2005-12-17 Thread Francois PIETTE
Ok. I made basic proxy checker... 5xHTTPCli that tries to connect through one of the proxies (with GetAsync method) from list and analizes if result is ok. But... I noticed that the more HTTPCli i use the more frequent Socket operation on non-socket error occures. Why is that? What is this

Re: [twsocket] HttpCli and quot;Socket operation on non-socketquot;

2005-12-17 Thread Me
Wiadomość Oryginalna Od: Francois PIETTE [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Sat, 17 Dec 2005 18:26:32 +0100 Temat: Re: [twsocket] HttpCli and Socket operation on non-socket Ok. I made basic proxy checker... 5xHTTPCli that tries to connect through

[twsocket] HttpCli Close or CloseAsync?

2005-12-17 Thread Me
Whats the difference between Close and CloseAsync? If i am using GetAsync shouldnt i use CloseAsync instead of Close? Maybe thats why im getting socket errors? Ann -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket

[twsocket] HttpCli.RcvStream - how to clear?

2005-12-17 Thread Me
Hi I noticed that if I'm not doing anything with RCVStream of HTTPCli in requests im getting Stream with data from previous requests that were made on the component. How do i avoid it? How to cleanup rcvStream? Setting it to nil after RequestDone causes Access Violation. Ann -- To

Re: [twsocket] HttpCli.RcvStream - how to clear?

2005-12-17 Thread Ionut Muntean
Try RcvStream.Position := 0; when resetting ... If you set it to nil, it is obvious you'll get Access Violations. / IM Me wrote: Hi I noticed that if I'm not doing anything with RCVStream of HTTPCli in requests im getting Stream with data from previous requests that were made on the

Re: [twsocket] HttpCli.RcvStream - how to clear?

2005-12-17 Thread Me
Would be great but sometimes im not reciving any data so the old one wont be overwritten ;-( Wiadomość Oryginalna Od: Ionut Muntean [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Sat, 17 Dec 2005 22:50:36 +0200 Temat: Re: [twsocket] HttpCli.RcvStream - how to

Re: [twsocket] HttpCli.RcvStream - how to clear?

2005-12-17 Thread Arno Garrels
Me wrote: Would be great but sometimes im not reciving any data so the old one wont be overwritten ;-( Again, you don't need multithreading for your few 20 THttpCli instances. ICS can easily handle more instances (faster) in a single thread and it is much easier to code. --- Arno Garrels

[twsocket] assembling data on socket receive

2005-12-17 Thread lame.one
Francois Piette, thanks for responding to my last post about tcp primer. I looked into linemode and it looks very useful. The problem for me is I am writing a chat client with ICS and I'm writing both an unofficial third party irc and yahoo chat client but i'm struggling with handling the receive