Table of Contents

Class ExchangeInfo

Namespace
Fluxzy
Assembly
Fluxzy.Core.dll

Packed information about an exchange

[MessagePackObject(false)]
public class ExchangeInfo : IExchange, IExchangeLine
Inheritance
ExchangeInfo
Implements
Inherited Members
Extension Methods

Constructors

ExchangeInfo(int, int, string, RequestHeaderInfo, ResponseHeaderInfo?, ExchangeMetrics, string, bool, string?, HashSet<Tag>?, bool, List<WsMessage>, Agent?, List<ClientError>, string, int, bool)

Default constructor

[JsonConstructor]
public ExchangeInfo(int id, int connectionId, string httpVersion, RequestHeaderInfo requestHeader, ResponseHeaderInfo? responseHeader, ExchangeMetrics metrics, string egressIp, bool pending, string? comment, HashSet<Tag>? tags, bool isWebSocket, List<WsMessage> webSocketMessages, Agent? agent, List<ClientError> clientErrors, string knownAuthority, int knownPort, bool secure)

Parameters

id int
connectionId int
httpVersion string
requestHeader RequestHeaderInfo
responseHeader ResponseHeaderInfo
metrics ExchangeMetrics
egressIp string
pending bool
comment string
tags HashSet<Tag>
isWebSocket bool
webSocketMessages List<WsMessage>
agent Agent
clientErrors List<ClientError>
knownAuthority string
knownPort int
secure bool

Properties

Agent

A friendly information about the client agent. In default implementation, agent is inferred from user agent.

[Key(15)]
public Agent? Agent { get; }

Property Value

Agent

ClientErrors

Contains a list of transport errors that occurred during the exchange.

[Key(16)]
public List<ClientError> ClientErrors { get; }

Property Value

List<ClientError>

Comment

A comment about about this exchange

[Key(11)]
public string? Comment { get; set; }

Property Value

string

ConnectionId

The connection id

[JsonPropertyOrder(-10)]
[Key(0)]
public int ConnectionId { get; }

Property Value

int

ContentType

A simplified response content type of this exchange, values can be: json, html, css, img, xml, js, font, audio, video, pdf, pbuf, text, xul, zip, bin

[IgnoreMember]
public string? ContentType { get; }

Property Value

string

Done

True if the exchange is complete

[IgnoreMember]
public bool Done { get; }

Property Value

bool

EgressIp

The remote IP address, null if not known

[Key(10)]
public string? EgressIp { get; }

Property Value

string

FullUrl

The absolute full url of the request

[IgnoreMember]
public string FullUrl { get; }

Property Value

string

HttpVersion

The http version, values possible are HTTP/1.1, HTTP/2

[Key(6)]
public string HttpVersion { get; }

Property Value

string

Id

The exchange id

[JsonPropertyOrder(-9)]
[Key(1)]
public int Id { get; }

Property Value

int

IsWebSocket

True if the current exchange is a websocket exchange

[Key(13)]
public bool IsWebSocket { get; }

Property Value

bool

KnownAuthority

The remote hostname

[Key(7)]
public string KnownAuthority { get; }

Property Value

string

KnownPort

The remote port

[Key(8)]
public int KnownPort { get; }

Property Value

int

Method

The request method

[IgnoreMember]
public string Method { get; }

Property Value

string

Metrics

Metrics about this exchange

[Key(4)]
public ExchangeMetrics Metrics { get; }

Property Value

ExchangeMetrics

Path

The request path only

[IgnoreMember]
public string Path { get; }

Property Value

string

Pending

True if the exchange is pending

[Key(5)]
public bool Pending { get; }

Property Value

bool

Received

The total number of bytes received

[IgnoreMember]
public long Received { get; }

Property Value

long

RequestHeader

The request header

[Key(2)]
public RequestHeaderInfo RequestHeader { get; }

Property Value

RequestHeaderInfo

ResponseHeader

The response header

[Key(3)]
public ResponseHeaderInfo? ResponseHeader { get; }

Property Value

ResponseHeaderInfo

Secure

True if exchange is HTTPS

[Key(9)]
public bool Secure { get; }

Property Value

bool

Sent

The total number of bytes sent

[IgnoreMember]
public long Sent { get; }

Property Value

long

StatusCode

The HTTP status code. If no response has been received: 0.

[IgnoreMember]
public int StatusCode { get; }

Property Value

int

Tags

Tags (metainformation) on this exchange

[Key(12)]
public HashSet<Tag> Tags { get; }

Property Value

HashSet<Tag>

WebSocketMessages

List of websocket messages if the current exchange is a websocket exchange. null otherwise

[Key(14)]
public List<WsMessage>? WebSocketMessages { get; }

Property Value

List<WsMessage>

Methods

GetRequestHeaders()

Enumerate request headers

public IEnumerable<HeaderFieldInfo> GetRequestHeaders()

Returns

IEnumerable<HeaderFieldInfo>

GetResponseHeaders()

Enumerate response headers

public IEnumerable<HeaderFieldInfo>? GetResponseHeaders()

Returns

IEnumerable<HeaderFieldInfo>