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
intconnectionId
inthttpVersion
stringrequestHeader
RequestHeaderInforesponseHeader
ResponseHeaderInfometrics
ExchangeMetricsegressIp
stringpending
boolcomment
stringtags
HashSet<Tag>isWebSocket
boolwebSocketMessages
List<WsMessage>agent
AgentclientErrors
List<ClientError>knownAuthority
stringknownPort
intsecure
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
ClientErrors
Contains a list of transport errors that occurred during the exchange.
[Key(16)]
public List<ClientError> ClientErrors { get; }
Property Value
Comment
A comment about about this exchange
[Key(11)]
public string? Comment { get; set; }
Property Value
ConnectionId
The connection id
[JsonPropertyOrder(-10)]
[Key(0)]
public int ConnectionId { get; }
Property Value
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
Done
True if the exchange is complete
[IgnoreMember]
public bool Done { get; }
Property Value
EgressIp
The remote IP address, null if not known
[Key(10)]
public string? EgressIp { get; }
Property Value
FullUrl
The absolute full url of the request
[IgnoreMember]
public string FullUrl { get; }
Property Value
HttpVersion
The http version, values possible are HTTP/1.1, HTTP/2
[Key(6)]
public string HttpVersion { get; }
Property Value
Id
The exchange id
[JsonPropertyOrder(-9)]
[Key(1)]
public int Id { get; }
Property Value
IsWebSocket
True if the current exchange is a websocket exchange
[Key(13)]
public bool IsWebSocket { get; }
Property Value
KnownAuthority
The remote hostname
[Key(7)]
public string KnownAuthority { get; }
Property Value
KnownPort
The remote port
[Key(8)]
public int KnownPort { get; }
Property Value
Method
The request method
[IgnoreMember]
public string Method { get; }
Property Value
Metrics
Metrics about this exchange
[Key(4)]
public ExchangeMetrics Metrics { get; }
Property Value
Path
The request path only
[IgnoreMember]
public string Path { get; }
Property Value
Pending
True if the exchange is pending
[Key(5)]
public bool Pending { get; }
Property Value
Received
The total number of bytes received
[IgnoreMember]
public long Received { get; }
Property Value
RequestHeader
The request header
[Key(2)]
public RequestHeaderInfo RequestHeader { get; }
Property Value
ResponseHeader
The response header
[Key(3)]
public ResponseHeaderInfo? ResponseHeader { get; }
Property Value
Secure
True if exchange is HTTPS
[Key(9)]
public bool Secure { get; }
Property Value
Sent
The total number of bytes sent
[IgnoreMember]
public long Sent { get; }
Property Value
StatusCode
The HTTP status code. If no response has been received: 0.
[IgnoreMember]
public int StatusCode { get; }
Property Value
Tags
Tags (metainformation) on this exchange
[Key(12)]
public HashSet<Tag> Tags { get; }
Property Value
WebSocketMessages
List of websocket messages if the current exchange is a websocket exchange. null otherwise
[Key(14)]
public List<WsMessage>? WebSocketMessages { get; }
Property Value
Methods
GetRequestHeaders()
Enumerate request headers
public IEnumerable<HeaderFieldInfo> GetRequestHeaders()
Returns
GetResponseHeaders()
Enumerate response headers
public IEnumerable<HeaderFieldInfo>? GetResponseHeaders()