Binary Data Conversion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tawanda diza
    New Member
    • Sep 2011
    • 29

    Binary Data Conversion

    i am receiving data from a server. the first 4 bytes represent the message length.

    when i try to debug what is in those four bytes, i see a funny character which looks like '￴'

    when i look at the hex value of this character on my wire shark application it will be F4.

    on the server side its shows that it has sent 244 bytes to me.( thats F4 = 244)

    my problem is: how do i convert the '￴' character to an integer value of 244


    thank you
  • donbock
    Recognized Expert Top Contributor
    • Mar 2008
    • 2427

    #2
    Can you show us the code you're currently using to obtain those first four bytes?

    Comment

    • tawanda diza
      New Member
      • Sep 2011
      • 29

      #3
      HIE DONBOCK
      Code:
      char sizeinfo[4];
      nData = recv( hServer, &sizeinfo[0], 4, 0 );

      Comment

      Working...