Re: [twsocket] OK to Receiving 2GB ?

2005-10-31 Thread David Lewis
ethernet -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kei Sent: Saturday, October 29, 2005 3:26 PM To: ICS support mailing Subject: Re: [twsocket] OK to Receiving 2GB ? Hi! I think I'm going to accept the reality that... TCP packets are splitted

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 zero,

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 ByteRemaining

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 is

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 not

[twsocket] OK to Receiving 2GB ?

2005-10-29 Thread Kei
Hi! I'm new to ICS! I am designing a simple protocol that will be mainly used locally (as a database server backend)..so I'm guessing I could send up to 2GB of stuff without hassle (BLOBs, for example). Right now I'm just experimenting with the facility for two parties to effectively talk to each

Re: [twsocket] OK to Receiving 2GB ?

2005-10-29 Thread Wilfried Mestdagh
Hello David, Hi! I'm new to ICS! Welcome to the group :) A-B: msg hello B-A: msg yo! how's it going? Yes that's the way to go. Design a user made proto for what you intend to do. If A is larger than the default buffer size (256 chars) then the A (sender) will warn B in advance You can

Re: [twsocket] OK to Receiving 2GB ?

2005-10-29 Thread Kei
Hi! I think I'm going to accept the reality that... TCP packets are splitted into arbitrary sizes.. but!!! How do I know the maximum size possible? What is the maximum size that a packet can be? I certainly don't want to malloc 100KB for a TCP packet... Thanks! David Wilfried Mestdagh wrote:

Re: [twsocket] OK to Receiving 2GB ?

2005-10-29 Thread zayin
http://www.faqs.org/rfcs/rfc879.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kei Sent: Saturday, October 29, 2005 2:26 PM To: ICS support mailing Subject: Re: [twsocket] OK to Receiving 2GB ? Hi! I think I'm going to accept the reality

Re: [twsocket] OK to Receiving 2GB ?

2005-10-29 Thread Darin McGee
About 1500 bytes give or take a few over ethernet -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kei Sent: Saturday, October 29, 2005 3:26 PM To: ICS support mailing Subject: Re: [twsocket] OK to Receiving 2GB ? Hi! I think I'm going to accept