Adding endianness handling to server_nim.c