The issue is that not all computers use the same endian- wikipedia would have a great explanation I'm sure. Any data type which is greater than 1 byte will need to be in the correct byte order. A char is just one byte, so every computer would read that the same way, but a typical int is 4 bytes hence big and little endian computers would store them differently.
I hope this sufficiently answers your question. On Mon, Jan 26, 2009 at 11:07 AM, Andrew Fenn <[email protected]> wrote: > On Mon, Jan 26, 2009 at 3:08 PM, Mark Palkow <[email protected]> wrote: > > Is "strcat" the right thing? > > I would try "strcpy" instead. > > Hurray, it works. One more question if you don't mind. > > I was reading in the mailing list that one should use the POSH library > to convert all data to big endian before transmitting. This is done so > that if one transmits from Mac -> Windows -> Linux the data doesn't > end up as garbage. Is this correct? What data needs converting, just > int and float not char? > > Sorry for all the silly questions. > > Thanks, > Andrew > _______________________________________________ > ENet-discuss mailing list > [email protected] > http://lists.cubik.org/mailman/listinfo/enet-discuss > -- aaron r andersen tel: (647) 377-0401 e-mail: [email protected]
_______________________________________________ ENet-discuss mailing list [email protected] http://lists.cubik.org/mailman/listinfo/enet-discuss
