Thread (7 messages) 7 messages, 3 authors, 2012-10-17

Network Byte order not reached reading from a sock RAW

From: Kumar amit mehta <hidden>
Date: 2012-10-15 08:28:52

On Mon, Oct 15, 2012 at 07:46:08AM +0000, Pietro Paolini wrote:
Hello,
Thanks for your answer, my question is why when I read from the buffer data is already in host byte order and not in network byte order.
Thanks 
Pietro Paolini.
Hi Pietro,

The host doesn't care how the data has travelled over wire, he will store that 
data in memory according to it's own hardware architecture. As an application 
programmer, __you__ have to take care of this and to make your job easier, you
already have those ntoh* hton* APIs or your POSIX compliant OS.

-Amit
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help