Re: question about bitfields to decode websocket header

2018-11-07 Thread test via Digitalmars-d-learn
On Wednesday, 7 November 2018 at 14:22:43 UTC, lithium iodate wrote: On Wednesday, 7 November 2018 at 13:05:49 UTC, test wrote: I am confused about the bitfields order. The bitfields start with the least significant bits: fin -> 1 rsv1 -> 0 rsv2 -> 0 rsv3 -> 0 opcode -> 1000 = 8 mask -> 1 _si

Re: question about bitfields to decode websocket header

2018-11-07 Thread lithium iodate via Digitalmars-d-learn
On Wednesday, 7 November 2018 at 13:05:49 UTC, test wrote: I am confused about the bitfields order. mixin(bitfields!( bool, "fin",1, bool, "rsv1", 1, bool, "rsv2", 1, bool, "rsv3", 1, Opcode, "opcode", 4,