View Single Post
  #82   Spotlight this post!  
Unread 13-06-2002, 21:58
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Looks good. It should also align the data for all subsequent reads, making it a little bit faster. Just make sure start isn't equal to 0 before you go into that last block of code, as I don't know how VC++ deals with arrays of size 0 or how ReadFile deals with requests of length 0. Might be OK, might cause page faults; you never know 'til you try.

I definately agree that overlapping two packets isn't ideal, but I was too lazy to change it after I realized that was what it was doing (I wrote the algorithim around 3am last year in Florida and wasn't quite thinking right).
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php