Article View: borland.public.cppbuilder.internet.socket
Article #3185Re: packet contatenation
From: Hans Galema
Date: Tue, 25 Oct 2005 16:32
Date: Tue, 25 Oct 2005 16:32
31 lines
2157 bytes
2157 bytes
Joe Black wrote: > .... The problem seems to be when I send > several packets straight after each other, the packets are all sent > within a thread that activates every 35 ms and it sends one packet at a > time. But what is the problem ? > For some reason though several packets seem to get concatenated together > to form one larger packet, if I slow down the transmit thread to say > every 200ms this problems dissapears, Yes that is normal. Winsock will send it's buffer when it is full or a certain amount of time has elapsed. > this sort of time delay however is > unacceptable. What I would like to know is: > > Is there anyway to determine whether the last packet was sent before I > attempt to send the next one Don't think so. But why would you? You have to program the receiving side in such a way that it can handle multiple 'packets' in one read event. Just as the receiving side should concatenate read-events until a complete (big) message is received. FYI: it is confusing that you use the word packet for the message that you send. TCP/IP uses packets already. Hans.
Technical Details
Message-ID:
<435e5d95$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!194.25.134.62.MISMATCH!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<435e5931$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,de4e39df019561af X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Tue, 25 Oct 2005 18:32:04 +0200 From: Hans Galema <notused@notused.nl> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: packet contatenation References: <435e5931$1@newsgroups.borland.com> In-Reply-To: <435e5931$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 145.98.201.248 Message-ID: <435e5d95$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1130257813 145.98.201.248 (25 Oct 2005 09:30:13 -0700) Lines: 31 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!194.25.134.62.MISMATCH!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail