Search code examples
c++builderindyindy10

What is corresponding to GStack.HostToNetwork() in Indy10


My Environment:

C++ Builder XE4
Indy 10.6.0.4975

I am searching information on conversion from host byte order to network byte order.

I found info for Indy 9 using GStack.HostToNetwork(). However, I do not find one for Indy10.

What is corresponding one for Indy10?


Solution

  • You have your information backwards.

    There were no TIdStack::HostToNetwork() (or TIdStack::NetworkToHost()) methods in Indy 9. They were TIdStack::WSHToN...() (and TIdStack::WSNToH...()) instead.

    TIdStack::HostToNetwork() is for Indy 10. There are also HostToLittleEndian() (and LittleEndianToHost()) functions in IdGlobal.hpp.