Looks good upon cursory review. I think we could optimize some of the socket calls (short read/write cases), but that was there before. We could always clean that up later. (sscanf - ugh!)I'd like to let someone review before committing, because it's at least a bunch of core changes.
My only real complaint is the tabs/formatting. =) There seem to be lots of whitespace issues. (Again, there before, but we ought to clean it up when we place it in the new location.) -- justin