Adding updated TCP C implementation with endianness handling