Table of Contents

Class SessionResponse

Namespace
VpnHood.Core.Common.Messaging
Assembly
VpnHood.Core.Common.dll

Represents a server's answer to a session's request: its outcome and what the session has used.

public class SessionResponse
Inheritance
SessionResponse
Derived
Inherited Members

Properties

AccessKey

Gets or sets an access key that replaces the client's, or null.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? AccessKey { get; set; }

Property Value

string

AccessUsage

Gets or sets what the session has used of its access, or null.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public AccessUsage? AccessUsage { get; set; }

Property Value

AccessUsage

ClientCountry

Gets or sets the code of the country the server places the client in, or null.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? ClientCountry { get; set; }

Property Value

string

ClientPublicAddress

Gets or sets the client's public IP address as the server sees it, or null.

[JsonConverter(typeof(IPAddressConverter))]
public IPAddress? ClientPublicAddress { get; set; }

Property Value

IPAddress

ErrorCode

Gets or sets the outcome.

public required SessionErrorCode ErrorCode { get; set; }

Property Value

SessionErrorCode

ErrorMessage

Gets or sets the error's message, or null.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? ErrorMessage { get; set; }

Property Value

string

RedirectHostEndPoint

Gets or sets the server to redirect to, for clients before protocol 10.

[Obsolete("Deprecated on protocol 10. User ServerTokens")]
[JsonConverter(typeof(IPEndPointConverter))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public IPEndPoint? RedirectHostEndPoint { get; set; }

Property Value

IPEndPoint

RedirectHostEndPoints

Gets or sets the servers to redirect to, for clients before protocol 10.

[Obsolete("Deprecated on protocol 10. User ServerTokens")]
[JsonConverter(typeof(ArrayConverter<IPEndPoint, IPEndPointConverter>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public IPEndPoint[]? RedirectHostEndPoints { get; set; }

Property Value

IPEndPoint[]

RedirectServerTokens

Gets or sets the server tokens of the servers to redirect to, with RedirectHost, or null.

public ServerToken[]? RedirectServerTokens { get; set; }

Property Value

ServerToken[]

Revision

Gets or sets the reply's revision, meant to grow with each reply the access manager builds for the session; reserved, as no access manager sends one and no server reads it yet.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public long Revision { get; set; }

Property Value

long

SuppressedBy

Gets or sets whose newer session took this one's place, with SessionSuppressedBy.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public SessionSuppressType SuppressedBy { get; set; }

Property Value

SessionSuppressType