[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 3.1.8 SDLNet_Read32

`Uint32 SDLNet_Read32(void *area)`

area
  The pointer into a data buffer, at which to get the number from

Get a 32bit (a long on 32bit systems) value from the data buffer area which is in network byte order. This helps avoid byte order differences between two systems that are talking over the network. The returned value can be a signed number, the unsigned parameter type doesn't affect the data. The area pointer need not be at the beginning of a buffer, but must have at least 4 bytes of space left, including the byte currently pointed at.

    // get a number from a data buffer to use on this host
    //char *ptr; //this points into a previously received data buffer
    Uint32 number;
    number=SDLNet_Read32(ptr);
    // number is now in your hosts byte order, ready to use.

See Also:
3.1.6 SDLNet_Write32, 3.1.7 SDLNet_Read16

This document was generated on November, 3 2009 using texi2html