Re: [twsocket] OK to Receiving >2GB ?

2005-10-30 Thread Wilfried Mestdagh
Hello David, > How do I know the maximum size possible? at receiving side, specially depending on the speed of your own program you mostly never get above 8 kb. However I have seen receiving packets 10 time as high. But you dont have to care mutch, if you receive not all, then OnDataAvailable is

Re: [twsocket] OK to Receiving >2GB ?

2005-10-30 Thread Kei
Hi Everyone I've solved this problem.. what I do is make a count of "How many bytes remaining". Everytime the value returned by Receive() will be subtracted from the "BytesRemaining". When OnDataAvailable is repeatedly called, a buffer is kept being ReAlloc()'ed . When "ByteRemaining" reaches z

Re: [twsocket] OK to Receiving >2GB ?

2005-10-30 Thread Wilfried Mestdagh
Hello David, Thanks for feedback. That is indeed the right way to do it. Remember that Receive() may return -1, and in that case you dont want to substrackt it from BytesRemaining, so something like this: Count := TWSocket(Sender).Receive(Buf, Min(BufSize, BytesRemaining)); if Count <= 0 then

Re: [twsocket] OK to Receiving >2GB ?

2005-10-30 Thread Arno Garrels
Kei wrote: > Hi Everyone > > I've solved this problem.. what I do is make a count of "How many bytes > remaining". Everytime the value returned by Receive() will be subtracted > from the "BytesRemaining". When OnDataAvailable is repeatedly called, a > buffer is kept being ReAlloc()'ed . When "Byte

Re: [twsocket] TeamICS web page

2005-10-30 Thread Tibor Csonka
LOL, it's good to see you guys! It was like I was changing mails with phantoms. Keep up the good work! Best regards, Tibor Csonka > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Francois PIETTE > Sent: Wednesday, October 26, 2005 9:38 PM > To: twso

Re: [twsocket] Downloading a webpage, including its pictures. How??

2005-10-30 Thread Tibor Csonka
ThttpCli is the best fit, but if you want HTTPS, contribute a bit to SSL effort :) and use TSslHttpCli. You will have to have a good HTML parser also and maybe a JavaScript interpreter. The basic idea is to dwomload a 'first page' (that's from where all the crawling begins) parse the HTML search

Re: [twsocket] Downloading a webpage, including its pictures. How??

2005-10-30 Thread Francois PIETTE
> Do you have any examples of how to use THttpCli for tasks like this? See HttpTst sample program which comes with ICS. Note that a webpage is made of a lot of documents. Your frequently have a base HTML document which contains references to embededd documents such as style sheet, images, sound

Re: [twsocket] OK to Receiving >2GB ?

2005-10-30 Thread Kei
I don't allocate the memory up to the size of the "Designated size" but keep realloc-ing until "remaining-byte" counter reaches zero.. Do you think I should use TStream (Stream.readbuffer, readbuffer, ...) or just a pointer of buffer (malloc, realloc, and basic pointer operations) ? Which one i

Re: [twsocket] OK to Receiving >2GB ?

2005-10-30 Thread Arno Garrels
Kei wrote: > I don't allocate the memory up to the size of the "Designated size" but > keep realloc-ing until "remaining-byte" counter reaches zero.. > Do you think I should use TStream (Stream.readbuffer, readbuffer, ...) > or just a pointer of buffer (malloc, realloc, and basic pointer > operati

Re: [twsocket] OK to Receiving >2GB ?

2005-10-30 Thread Wilfried Mestdagh
Hello David, > I don't allocate the memory up to the size of the "Designated size" but > keep realloc-ing until "remaining-byte" counter reaches zero.. I'm not sure I understeand exacly what you mean. But if you are reallocating memory whole the time, you end up with a non efficient program, if n

[twsocket] SocketSpy (User Made) Question...

2005-10-30 Thread brock williams
hi i was looking through SocketSpy source code under "User Made" section of ICS website and when i tested program i was curious about something. If i would like to send data (packets) to both the remote connection and local connection how would i do so? A TWSocketServer component exist on the form