2 ms·
When my data structures are messages to be sent over a network, I always start with msgId and msgLen, both fixed width fields. This solves the message differen
by efitz 6mo ago
When my data structures are messages to be sent over a network, I always start with msgId and msgLen, both fixed width fields.
This solves the message differentiation problem explicitly, makes security and memory management easier, and reduces routing to:
switch(msg.msgId):
…
- i386 6mo agoswitch on version, then messageId…