From: Rob Body (rdb++at++hrwallingford.co.uk)
Date: 11/13/2001 04:05:36
Hi Performer friends,
This is a little off subject but I am integrating some networking into my
Performer app so that I can update my position from an external source and
when receiving a 2 byte number that I know should be 2, I receive 512. This
is obviously a byte ordering problem so I have used ntohs to try and swap
the ordering of the bytes but I still get 512 after using ntohs.
Does anyone know how I can successfully swap the order of the bytes ??
Any help is much appreciated.
Rob
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rob Body
Simulator Manager
HR Mardyn
HR Wallingford
Howbery Park
Wallingford
Oxon
OX10 8BA
Tel 01491 822327
Fax 01491 832233
e-mail r.body++at++hrwallingford.co.uk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
HR Wallingford uses Faxes and Emails for confidential and
legally privileged business communications. They do not of
themselves create legal commitments. Disclosure to parties
other than addressees requires our specific consent. We are
not liable for unauthorised disclosures nor reliance upon
them. If you have received this message in error please
advise us immediately and destroy all copies of it.
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
This archive was generated by hypermail 2b29 : Tue Nov 13 2001 - 04:10:00 PST