Libre Gaming Infrastructure

LGI message

LGI messages are encapsulated into SRM messages so their size is not explicitly stored on the LGI level. LGI messages start with a type:

enum LGIMessageType : uint8_t
{
	Handshake = 0,
	Alert = 1,
	Infrastructure = 2,
	ApplicationData = 3
};

struct LGIMessage
{
	LGIMessageType type;
	switch (type)
	{
		case LGIMessageType::Handshake:
		{
			LGIHandshakeMessage message;
		}
		case LGIMessageType::Alert:
		{
			LGIAlertMessage message;
		}
		case LGIMessageType::Infrastructure:
		{
			LGIInfrastructureMessage message;
		}
		case LGIMessageType::ApplicationData:
		{
			LGIApplicationDataMessage message;
		}
	}
};