Libre Gaming Infrastructure

Alert message

This section is not finalized and may change significantly in the future.

LGI Alert messages signal warnings and errors. All alerts have 2 levels: warning and fatal.

enum LGIAlertLevel : uint8_t
{
	Warning = 0,
	Fatal = 1
};

Upon receiving a fatal alert the connection must be immediately closed. There are several alert types:

enum LGIAlertType : uint8_t
{
	Disconnect = 0,
	UnexpectedMessage = ???,
	HandshakeFailure = ???
};

struct LGIAlertMessage
{
	LGIAlertLevel level;
	LGIAlertType type;
};

Disconnect

Disconnect alert should be sent when you are manually closing the connection, e.g. request by user. This alert should always be fatal.

UnexpectedMessage

UnexpectedMessage alert should be sent when the message violating protocol was received. This should never occur in correct implementations and is always fatal.

HandshakeFailure

HandshakeFailure alert should be sent when there was a problem establishing a handshake, for example unsupported algorithm.