Class SessionEventArgsBase
Holds info related to a single proxy session (single request/response sequence). A proxy session is bounded to a single connection from client. A proxy session ends when client terminates connection to proxy or when server terminates connection from proxy.
Implements
Inherited Members
Namespace: Titanium.Web.Proxy.EventArguments
Assembly: Titanium.Web.Proxy.dll
Syntax
public abstract class SessionEventArgsBase : EventArgs, IDisposable
Constructors
SessionEventArgsBase(Int32, ProxyEndPoint, CancellationTokenSource, Request, ExceptionHandler)
Declaration
protected SessionEventArgsBase(int bufferSize, ProxyEndPoint endPoint, CancellationTokenSource cancellationTokenSource, Request request, ExceptionHandler exceptionFunc)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | bufferSize | |
| ProxyEndPoint | endPoint | |
| CancellationTokenSource | cancellationTokenSource | |
| Request | request | |
| ExceptionHandler | exceptionFunc |
Fields
BufferSize
Size of Buffers used by this object
Declaration
protected readonly int BufferSize
Field Value
| Type | Description |
|---|---|
| Int32 |
ExceptionFunc
Declaration
protected readonly ExceptionHandler ExceptionFunc
Field Value
| Type | Description |
|---|---|
| ExceptionHandler |
Properties
ClientEndPoint
Client End Point.
Declaration
public IPEndPoint ClientEndPoint { get; }
Property Value
| Type | Description |
|---|---|
| IPEndPoint |
CustomUpStreamProxyUsed
Are we using a custom upstream HTTP(S) proxy?
Declaration
public ExternalProxy CustomUpStreamProxyUsed { get; }
Property Value
| Type | Description |
|---|---|
| ExternalProxy |
Exception
The last exception that happened.
Declaration
public Exception Exception { get; }
Property Value
| Type | Description |
|---|---|
| Exception |
Id
Returns a unique Id for this request/response session which is same as the RequestId of WebSession.
Declaration
public Guid Id { get; }
Property Value
| Type | Description |
|---|---|
| Guid |
IsHttps
Does this session uses SSL?
Declaration
public bool IsHttps { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
IsTransparent
Is this a transparent endpoint?
Declaration
public bool IsTransparent { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
LocalEndPoint
Local endpoint via which we make the request.
Declaration
public ProxyEndPoint LocalEndPoint { get; }
Property Value
| Type | Description |
|---|---|
| ProxyEndPoint |
WebSession
A web session corresponding to a single request/response sequence within a proxy connection.
Declaration
public HttpWebClient WebSession { get; }
Property Value
| Type | Description |
|---|---|
| HttpWebClient |
Methods
Dispose()
Implements cleanup here.
Declaration
public virtual void Dispose()
TerminateSession()
Terminates the session abruptly by terminating client/server connections.
Declaration
public void TerminateSession()
Events
DataReceived
Fired when data is received within this session from client/server.
Declaration
public event EventHandler<DataEventArgs> DataReceived
Event Type
| Type | Description |
|---|---|
| EventHandler<DataEventArgs> |
DataSent
Fired when data is sent within this session to server/client.
Declaration
public event EventHandler<DataEventArgs> DataSent
Event Type
| Type | Description |
|---|---|
| EventHandler<DataEventArgs> |