Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
A static array would make separate threads each using their own message
instance stomp on eachother. If you add the UNSAFE define to NetOutgoingMessage
it will use unsafe code to avoid the allocation however. Still looking for a
way to do this safely.
Original comment by lidg...@gmail.com
on 7 Jan 2012 at 9:55
hi,
you can create a union struct to convert a float value.
[StructLayout(LayoutKind.Explicit)]
public struct SampleUnion
{
[FieldOffset(0)] public float SingleValue;
[FieldOffset(0)] public byte B1;
[FieldOffset(1)] public byte B2;
[FieldOffset(2)] public byte B3;
[FieldOffset(3)] public byte B4;
}
Original comment by kutsa...@web.de
on 19 Jan 2012 at 7:12
Thanks; I had forgot about the union trick! Added in revision 282
Original comment by lidg...@gmail.com
on 20 Jan 2012 at 9:53
Original issue reported on code.google.com by
martin.b...@gmail.com
on 8 Jul 2011 at 3:24