title: Little-endian byte order
body: <p>I'm continuously sending arrays of pixel values from LabVIEW to a C-program through TCP/IP connection. The C-program receives a stream of bytes, so I'm converting the bytes to uint32 using the following code to print all the pixel values in an array. Does anyone know how to switch the byte-order to little-endian in this case?:</p>
  
  <pre><code>WSADATA wsa;
  SOCKET s , new_socket;
  struct sockaddr_in server , client;
  int c;
  int iResult;
  char recvbuf[DEFAULT_BUFLEN];
  int recvbuflen = DEFAULT_BUFLEN;
  typedef unsigned int uint32_t;
  unsigned int i;
  size_t len;
  uint32_t* p;
  uint32_t* endp;
  uint32_t value;
  
  p = (uint32_t*)((void*)recvbuf);
  
  do
  {
      iResult = recv(new_socket, recvbuf, recvbuflen, 0);
      len = iResult/sizeof(uint32_t);
  
      for(i=0; i &lt; len; i++)
      {
      value = p[i];
      }   
      printf("%d\n", value);  
  } 
  while ( iResult &gt; 0 );
  
      closesocket(new_socket);
      WSACleanup();
  
      return 0;
  }
  </code></pre>