08-26-2009 01:37 PM - edited 08-26-2009 01:38 PM
Try this.
(Note, there may be other ways of going about it.)
08-26-2009 02:11 PM
lavalava wrote:Say I'm sending 0xAABBCCFF. On the receiving, the UDP reader automatically converts 0xAABBCCFFto ASCII.
OK, you are flattening your U32 number of xAABBCCFF to a string on the sending end. All you need to do is unflatten from string on the receiving end using a U32 diagram constant (value not important) as type and you get your U32 number back. And make sure to read only 4 bytes.
08-26-2009 02:16 PM
lavalava wrote:...but the problem is my parser is expecting 0xAABBCCFF.
Let's take a step back, because it is irrelevant what the parse expects. All we need to know is what the parser should output on the other end given the existing binary string!
It would be very expensive to take the detour over formatted text, so let's not do that!
08-26-2009 05:58 PM