Table of Contents

Class Exchange

Namespace
Fluxzy.Core
Assembly
Fluxzy.Core.dll
public class Exchange : IExchange
Inheritance
Exchange
Implements
Inherited Members
Extension Methods

Constructors

Exchange(IIdProvider, Authority, ReadOnlyMemory<char>, string?, DateTime)

Creating exchange from handler

public Exchange(IIdProvider idProvider, Authority authority, ReadOnlyMemory<char> requestHeaderPlain, string? httpVersion, DateTime receivedFromProxy)

Parameters

idProvider IIdProvider
authority Authority
requestHeaderPlain ReadOnlyMemory<char>
httpVersion string
receivedFromProxy DateTime

Exchange(IIdProvider, ExchangeContext, Authority, RequestHeader, Stream, string, DateTime)

runtime constructor

public Exchange(IIdProvider idProvider, ExchangeContext context, Authority authority, RequestHeader requestHeader, Stream bodyStream, string httpVersion, DateTime receivedFromProxy)

Parameters

idProvider IIdProvider
context ExchangeContext
authority Authority
requestHeader RequestHeader
bodyStream Stream
httpVersion string
receivedFromProxy DateTime

Properties

Agent

public Agent? Agent { get; set; }

Property Value

Agent

Authority

The remote authority

public Authority Authority { get; set; }

Property Value

Authority

ClientErrors

public List<ClientError> ClientErrors { get; }

Property Value

List<ClientError>

Comment

public string? Comment { get; set; }

Property Value

string

Connection

Connection used by this exchange. The connection object is the connection open between the proxy and the remote server

public Connection? Connection { get; set; }

Property Value

Connection

Context

public ExchangeContext Context { get; }

Property Value

ExchangeContext

EgressIp

public string? EgressIp { get; }

Property Value

string

Errors

Contains a list of errors

public List<Error> Errors { get; }

Property Value

List<Error>

FullUrl

public string FullUrl { get; }

Property Value

string

HttpVersion

public string HttpVersion { get; set; }

Property Value

string

Id

public int Id { get; }

Property Value

int

IsWebSocket

public bool IsWebSocket { get; }

Property Value

bool

KnownAuthority

public string KnownAuthority { get; }

Property Value

string

KnownPort

public int KnownPort { get; }

Property Value

int

Method

public string Method { get; }

Property Value

string

Metrics

Represents timing and size metrics related to this exchange

public ExchangeMetrics Metrics { get; }

Property Value

ExchangeMetrics

Path

public string Path { get; }

Property Value

string

Request

Contains the request sent from the proxy to the remote server

public Request Request { get; }

Property Value

Request

Response

Contains the response of the remote server to the proxy

public Response Response { get; }

Property Value

Response

RunInLiveEdit

public bool RunInLiveEdit { get; set; }

Property Value

bool

StatusCode

public int StatusCode { get; }

Property Value

int

Step

public ExchangeStep Step { get; set; }

Property Value

ExchangeStep

Tags

public HashSet<Tag>? Tags { get; set; }

Property Value

HashSet<Tag>

WebSocketMessages

public List<WsMessage>? WebSocketMessages { get; set; }

Property Value

List<WsMessage>

Methods

CreateUntrackedExchange(IIdProvider, ExchangeContext, Authority, ReadOnlyMemory<char>, Stream, ReadOnlyMemory<char>, Stream, bool, string, DateTime)

public static Exchange CreateUntrackedExchange(IIdProvider idProvider, ExchangeContext context, Authority authority, ReadOnlyMemory<char> requestHeaderPlain, Stream requestBody, ReadOnlyMemory<char> responseHeader, Stream responseBody, bool isSecure, string httpVersion, DateTime receivedFromProxy)

Parameters

idProvider IIdProvider
context ExchangeContext
authority Authority
requestHeaderPlain ReadOnlyMemory<char>
requestBody Stream
responseHeader ReadOnlyMemory<char>
responseBody Stream
isSecure bool
httpVersion string
receivedFromProxy DateTime

Returns

Exchange

GetMetricsSummaryAsHeader()

Get performance metrics as header field

public HeaderField GetMetricsSummaryAsHeader()

Returns

HeaderField

GetRequestHeaders()

public IEnumerable<HeaderFieldInfo> GetRequestHeaders()

Returns

IEnumerable<HeaderFieldInfo>

GetResponseHeaders()

public IEnumerable<HeaderFieldInfo>? GetResponseHeaders()

Returns

IEnumerable<HeaderFieldInfo>

ShouldClose()

public bool ShouldClose()

Returns

bool