On 2012-10-28 22:41:27 +0000, Bob Tanner said:

> Something buggy in how I handle segmentation of the packets.
> 
> Example, I get 1340 bytes, after reading 15 SP_MOTD packets (15 * 84 = 
> 1260) I have 80 bytes "left over". Code goes into "misalign" state and 
> things are broken from that point forward. Spending time getting to 
> know Xcode and it's debugging.

Been short on time lately. Finally getting around to this issue. Found 
my problem. Guess I should write my unit tests before the code huh?

Anyways, I feel like I'm missing something really simple. I want to 
simulate "fragmented" packets.  I cannot for the life of me figure out 
how in objective-c to change ASCII text into the equivalent hex values.

I'm doing stuff like this now (SP_MOTD packet fragment)

    const char shouldFragment[] = {
        0x0b, 0x00, 0x00, 0x00, 0x48, 0x6f, 0x73, 0x74, 0x69, 0x6e, 
0x67, 0x20, 0x3a, 0x20, 0x42, 0x61, 0x73, 0x69, 0x63,
        0x20, 0x3c, 0x62, 0x61, 0x73, 0x69, 0x63, 0x40, 0x75, 0x73, 
0x2e, 0x6e, 0x65, 0x74, 0x72, 0x65, 0x6b, 0x2e, 0x6f,
        0x72, 0x67, 0x3e
    };

What am I missing? Seem like there should be something to change "Bob" 
into "0x42 0x6f 0x62"

const char *bob = asciiToHex("Bob");

I'm feeling really dumb right now.

-- 
Bob Tanner <basic at us.netrek.org>          
Key fingerprint = 9906 320A 8BB6 64AD 96A7  7785 CBFB 10BF 568B F98C
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20121113/235124ac/attachment.html>