On 04/06/2018 4:25 AM, Ethan wrote:
Step seven: In your receive function that takes a byte stream, put in a switch statement that looks a little bit like the following:

switch( msg.GetID )
{
     static foreach( Message; ServerMessages )
     {
     case ObjectIDOf!Message:
         Message deserialised = msg.FromBinary!Message;
         this.receive( deserialised );
     }
     default:
         break;
}

Make that a final switch, that should generate better assembly.

Reply via email to