View errata for Network Programming With Sockets


Page 305
In the readMessage function, the loop that looks for complete messages has a signed/unsigned error in it. The line of code that reads
user->currentMessageSize = *scan++;
should read
user->currentMessageSize = (unsigned char)*scan++;
Otherwise, messages over 126 bytes in length cause the server to stop sending messages. (Thanks to Randy Antler for finding and fixing this one)



borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book

webmonster@borkware.com