Add CultNet schema write forwarder
This commit is contained in:
parent
1f527ae99b
commit
061ffe54bc
6 changed files with 168 additions and 19 deletions
|
|
@ -87,6 +87,11 @@ namespace GameCult.Networking
|
|||
/// </summary>
|
||||
public bool LogSensitivePayloads { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether CultNet schema-v0 messages may be sent before user session verification.
|
||||
/// </summary>
|
||||
public bool AllowUnverifiedCultNetMessages { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the client currently has a verified session.
|
||||
/// </summary>
|
||||
|
|
@ -152,7 +157,7 @@ namespace GameCult.Networking
|
|||
|
||||
if (Connected && _peer != null)
|
||||
{
|
||||
if (Verified || message is CultNetLoginMessage or CultNetRegisterMessage or CultNetVerifyMessage)
|
||||
if (AllowUnverifiedCultNetMessages || Verified || message is CultNetLoginMessage or CultNetRegisterMessage or CultNetVerifyMessage)
|
||||
{
|
||||
Logger.LogDebug($"Sending CultNet schema message {message.SchemaVersion}");
|
||||
_peer.SendCultNet(message);
|
||||
|
|
|
|||
Loading…
Reference in a new issue