Recent

Author Topic: [SOLVED] Indy 10 sends more data than expected?  (Read 6738 times)

aidv

  • Full Member
  • ***
  • Posts: 173
Re: Indy 10 sends more data than expected?
« Reply #15 on: September 27, 2015, 07:35:58 pm »
Yes I am actually.

But it's so weird because I send a packet with start sequence plus some parameters which are a string of  78 bytes in length and a small file which has the size 119829 bytes an end sequence which is 10 bytes long, so in total 119917 bytes.

When received the data (in chunks as handled by indy automatically) the full received data is 176564 bytes.

That means that there is 56735 bytes extra somewhere.

I make sure that the fully received data has its start sequence at the very beginning, which is true, I've measured it, and also the end sequence at the very end of the data, which is true as well.

I have also made sure that the start and end sequence occur only once in the data, which is true (as of right now I've programmed the software to properly send one packet at a time even if sever sends have been made, using a send-queue).

So to sum it up:

1. Start and end sequences occur only once in the received data, and they occur in their respective positions.

2. The length of the pre-data up until the file-data have the correct size

4. Large packets seem to have a lot of extra data in them.

So my questions now are:

1. Does TMemoryStream add extra data when calling WriteBuffer? (I append data to the final TMemoryStream which then is sent via Indy)

2. Does indy add data when sending buffer chunks?

3. Does indy encode data being sent as TMemoryStream?

EDIT:

My suspicions goes towards Indys Write method.
I remember that with LNet I had to manually program my software to send data that was left inside the buffer, maybe Indy sends extra data when it is sending remaining data from the buffer?

If yes, how is it turned off?
« Last Edit: September 27, 2015, 07:42:56 pm by aidv »

aidv

  • Full Member
  • ***
  • Posts: 173
Re: Indy 10 sends more data than expected?
« Reply #16 on: September 27, 2015, 08:04:29 pm »
I'm an idiot!!!!!

I there's absolutely nothing wrong with Indy 10.

I was doing some weird ass bytes-to-UTF8 conversion in my code, I did it yesterday and forgot to remove it when I moved over to raw-bytes processing.

Sorry for wasting your time guys.

Everything works well now. I manage to send data properly and read data properly now.

Thank you for your help.

 

TinyPortal © 2005-2018