Click here to Skip to main content
15,906,766 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I was wondering if there is a need to do endian conversions for data being send via sockets in C# or will the underlying calls convert it for you?

I was reading up on network byte order I was thinking if this would affect different kinds of data like String, Short and Longs, etc...

Thanks!
Posted
Updated 29-Nov-11 18:42pm
v2

1 solution

If both sides of the connection is a .net application then there is no need for conversions, but if the standard requires a specific packet format and structure then you will have to create the endian accordingly.
 
Share this answer
 
Comments
amsga 17-Nov-11 1:06am    
So if let's say one side is running windows and the executable is in C# and on the other side, it is running UNIX and the executable is in C/C++, I need to do the underlying conversion before sending?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900