• Post Reply Bookmark Topic Watch Topic
  • New Topic

Network byte order  RSS feed

 
Akil Kumar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a C server and a Java client. I am running these programs on a windows x86 machine. When I read the data from C server using DataInputStream it reads the high endian first. But endian are machine dependent. So in my case windows it will follow little endian. How should I work aroung this?

I read about these network to host and host to network functions. I do have access to the server code.
Can anyone give some ideas?

Thanks
 
Lester Burnham
Rancher
Posts: 1337
 
Akil Kumar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I read a string, uint16 and uint32 from C in Java program?
While reading the string should I cast it to a char?

Thanks,
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!