void OnDataReceived(NetBuffer msg) { byte code = msg.ReadByte(); ServerCommand command = (ServerCommand)code; CommandsToDo.AddLast(Utilities.MakePair <ServerCommand, NetBuffer>(command, msg)); ExecuteCommands(); }