[Solved]Help needed with IdTcpClient... lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- cdbc · 2025-01-12 14:34 Hi Struggling wit Indy 10.6xxx Am I stupid or just really slooowww?!? How come, that when I receive an ACK of 4 bytes = (#20,#2,#0,#0), Indy insists on /stuffing/ the same amount of #0-bytes into my buffer before my /real/ bytes?!? I simply cannot understand it  Is it 'Endianness' or something else I've overlooked? Any help will be deeply appreciated  Btw: this is my recv-code:Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i //      fSock.IOHandler.ReadBytes(fInBuf,-1{fInBufLen});      f Sock.IOHandler.InputBuffer.ExtractToBytes(fInBuf,- 1{fInBufLen});Regards Benny ---------------------------------------------------------------------- Thaddy · 2025-01-12 16:04 Internet protocols are BigEndian, that may indeed be the case. Network byte order is BigEndian, hence we have the functions: - BEtoN - LEtoN - NtoBE - NtoLE where LE is little endian and BE is big endian, all in unit system. These transparently translate between the byte order - LE or BE - independent of systems. They are more or less duplicated on some platforms in the sockets and/or windows unit. You probably want https://www.freepascal.org/docs- html/rtl/system/beton.html Note that, unless you operate on a very,very low level, this is likely already taken care of in the next higher level protocol abstractions. Look at the example code for the TCP client/server in the fcl-net directory. ---------------------------------------------------------------------- cdbc · 2025-01-12 17:01 Hi Thanks mate, you made me look in the right place  Lots of clever mechanics inside 'Indy' and I was indeed operating on too low a level...  Regards Benny