PDA

View Full Version : Big-endian


ston00
05-02-2002, 09:24 PM
Hello,

Anyone know if isocket_writev() writes bytes in big-endian? If not, how do I write data in big-endian?

Thanks.

Kevin
05-03-2002, 04:36 PM
The socket functions will send data in the format that is on the current handset. Current US Market handsets are little endian, so you will have to convert your data before you send it, or convert it on the server side.

ston00
05-06-2002, 09:19 PM
Are there any BREW helper functions to do this?

Thanks.

Kevin
05-07-2002, 11:14 AM
Yes, in the 1.1 SDK you will find NTOHL NTOHS LETOHL LETOHL HTOLEL HTOLES HTONL and HTONS. These functions convert unsigned longs and shorts from host byte order to networkbye order and vis versa.

ston00
05-07-2002, 11:47 AM
I'm using SDK 1.0 and I don't see those functions. Are those only for 1.1?

Kevin
05-07-2002, 12:11 PM
The documentation was not correct for 1.0 But some are included in AEENet.h You can refer to it, and to the Socket example.

In 2.0 the helper functions in AEENet.h have been deprecated, and moved to AEEStdLib.h