I don't see why your first version could not work. I have programs which basically does the same thing (calling several Send in a row). And I can't imagine why an AMD processor whould fail doing that !
btw: Your second versin is much faster (well 50 iterations probably doesn't do any difference). You can also make the code a little bit clear by removing the test and puting one more send at the end of the loop: for I := 0 to Count-1 do begin // Same buffer assemblage BuildMessage(aString, aBuffer); Socket.PutDataInSendBuffer(@aBuffer[0], Length(aBuffer)); end; Socket.Send(nil, 0); -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be ----- Original Message ----- From: "Marcelo Grossi" <[EMAIL PROTECTED]> To: "ICS support mailing" <twsocket@elists.org> Sent: Friday, June 09, 2006 10:58 PM Subject: Re: [twsocket] 64-Bit Processors Issue > Hello again folks, > > I managed to "fix" the bug I told you guys about. Aparently it is > endeed > an ICS related problem or AMD's fault, can't be concise on that. Here's an > overview of the problem with the solution in sample codes: > > Problem: The server did not received the packet from the client, only > the first one. The packets in question were being sent from inside a for > loop (small one, about 50 iterations). Here is a sample code of the > "faulty" > version of the code (Delphi 6): > > for I := 0 to Count-1 do > begin > // This line being the assembly of the buffer, > // it is a very clean code and is a very fast function and very few > data. > // Buffer size estimations are about 20- bytes. > BuildMessage(aString, aBuffer); > // sends rapid-fire buffers to the server > Socket.Send(@aBuffer[0], Length(arBuffer)); > end; > > Solution: Using the cumulative send function provided with ICS the > problem is strangely resolved and the server receves ok the buffers (in > this > case, the single buffer made of the small buffers). Here is the sample > code: > > for I := 0 to Count-1 do > begin > // Same buffer assemblage > BuildMessage(aString, aBuffer); > // Only sends the packet when the processing is finished (last > iteration) > if I = (Count - 1) then > Socket.Send(@aBuffer[0], Length(aBuffer)) > else > Socket.PutDataInSendBuffer(@aBuffer[0], Length(aBuffer)); > end; > > I hope I could be of any help and I'm pretty sure this can be > reproduced > (using the sample codes above) in any client/server model being the client > an AMD 64-Bit processor (can't say much about Intel 64-Bit processors > because we could not test it out). Anyways, thank you very much for all > your > responses! > > Best regards, > > Marcelo Grossi > > ----- Original Message ----- > From: "Arno Garrels" <[EMAIL PROTECTED]> > To: "ICS support mailing" <twsocket@elists.org> > Sent: Friday, June 09, 2006 8:24 AM > Subject: Re: [twsocket] 64-Bit Processors Issue > > >> Marcelo Grossi wrote: >>> Hello again, >>> >>> I'm new to this list and since I've been getting your messages, I >>> was wondering if anyone got the message I sent about the problem I'm >>> having with the 64-Bit AMD processors. I really really need your help >>> on this, because I've never altered the source code of ICS and the >>> problem mentioned (see below) only happens with users of 64-bit AMD >>> (never tested with Intel) processors. >> >> It is very very unlikely that ICS in combination with AMD64 is the >> reason. I personally had troubles with hardware DEP (nx-flag) caused >> by another third party component, however I got at least a very strange >> exception. >> >> --- >> Arno Garrels [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 -- 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