C# Class HitProxy.Connection.CachedServer

Holds connection cache for a server on one IP address
Show file Open project: hultqvist/HitProxy Class Usage Examples

Public Properties

Property Type Description
endpoint System.Net.IPEndPoint
manager ConnectionManager

Public Methods

Method Description
CachedServer ( IPEndPoint endpoint, ConnectionManager manager ) : System
Cleanup ( ) : void
GetActiveConnection ( ) : CachedConnection

If available will return an unused connection that already is connected. Return null otherwise.

GetNewConnection ( ) : CachedConnection

Creates and return a new connection. If the maximum number of connections to that server is reached, it will return null.

GetUnlimitedNewConnection ( ) : CachedConnection
Remove ( CachedConnection connection ) : void

Remove a connection from the ServerCache This will trigger an event allowing pending connections to start.

ToString ( ) : string

Method Details

CachedServer() public method

public CachedServer ( IPEndPoint endpoint, ConnectionManager manager ) : System
endpoint System.Net.IPEndPoint
manager ConnectionManager
return System

Cleanup() public method

public Cleanup ( ) : void
return void

GetActiveConnection() public method

If available will return an unused connection that already is connected. Return null otherwise.
public GetActiveConnection ( ) : CachedConnection
return CachedConnection

GetNewConnection() public method

Creates and return a new connection. If the maximum number of connections to that server is reached, it will return null.
public GetNewConnection ( ) : CachedConnection
return CachedConnection

GetUnlimitedNewConnection() public method

public GetUnlimitedNewConnection ( ) : CachedConnection
return CachedConnection

Remove() public method

Remove a connection from the ServerCache This will trigger an event allowing pending connections to start.
public Remove ( CachedConnection connection ) : void
connection CachedConnection /// The connection to remove ///
return void

ToString() public method

public ToString ( ) : string
return string

Property Details

endpoint public property

public IPEndPoint,System.Net endpoint
return System.Net.IPEndPoint

manager public property

public ConnectionManager,HitProxy.Connection manager
return ConnectionManager