Results 1 to 2 of 2

Thread: Help!!!!

  1. #1

    Thread Starter
    Hyperactive Member FUBAR's Avatar
    Join Date
    Jan 2000
    Posts
    307

    Help!!!!

    can u tell me what this means?

    connect_time= pkt->data[off+3];
    connect_time= (connect_time<<8) + pkt->data[off+2];
    connect_time= (connect_time<<8) + pkt->data[off+1];
    connect_time= (connect_time<<8) + pkt->data[off];
    off+= sizeof(connect_time);

    im trying to figure out what connect_time would be

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    What it's doing is taking the four bytes from pkt->data, and putting them into a four-byte variable.

    The << 8 means to shift the data 1 byte to the left, so that you can add the next byte into the blank hole you've made.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width