ClintHeyer.Httpd
Class HttpSession

Sessions

Field Summary
ClintHeyer.Httpd.Connection connection
bool hasThrottle
string id
bool invalid
ClintHeyer.Httpd.ISessionManager manager
ClintHeyer.Httpd.Server server
long throttleRate
long ticks

Constructor Summary
HttpSession(string id, ClintHeyer.Httpd.ISessionManager manager, ClintHeyer.Httpd.Server server, ClintHeyer.Httpd.Connection connection)
         Constructor

Property Summary
bool HasThrottle
         Gets whether a throttle is applied to session
string Id
         Gets the session id
bool IsAlive
         Gets whether session is alive
ClintHeyer.Httpd.Server Server
         Gets the server
long ThrottleRate
         Gets or sets the throttle rate
long TransferRate
         Gets the last recorded transfer rate (bytes per second)

Method Summary
void Close()
         Closes off any data stream associated with session currently (but does not terminate session
void ConnectionClosed()
         Called by a connection when it has been closed
string ConnectionDetails()
         Gets connection details
void End()
         Closes and ends a session completely
string RemoteHost()
         Gets the remote host of user
string RemoteIP()
         Gets the remote IP-address of user
void SendData(byte[] data, int length, long throttle)
         Sends data to a session

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Field Detail

connection

private ClintHeyer.Httpd.Connection connection


hasThrottle

private bool hasThrottle


id

private string id


invalid

private bool invalid


manager

private ClintHeyer.Httpd.ISessionManager manager


server

private ClintHeyer.Httpd.Server server


throttleRate

private long throttleRate


ticks

private long ticks

Constructor Detail

HttpSession

public HttpSession(string id,
                   ClintHeyer.Httpd.ISessionManager manager,
                   ClintHeyer.Httpd.Server server,
                   ClintHeyer.Httpd.Connection connection)

Constructor

Parameters:
id - Session id
manager - Server manager. Can be null
server - Server
connection - Connection
Property Detail

HasThrottle

public bool HasThrottle

Gets whether a throttle is applied to session


Id

public string Id

Gets the session id


IsAlive

public bool IsAlive

Gets whether session is alive


Server

public ClintHeyer.Httpd.Server Server

Gets the server


ThrottleRate

public long ThrottleRate

Gets or sets the throttle rate


TransferRate

public long TransferRate

Gets the last recorded transfer rate (bytes per second)

Method Detail

Close

public void Close()

Closes off any data stream associated with session currently (but does not terminate session


ConnectionClosed

internal void ConnectionClosed()

Called by a connection when it has been closed


ConnectionDetails

public string ConnectionDetails()

Gets connection details

Returns:
Connection details

End

public void End()

Closes and ends a session completely


RemoteHost

public string RemoteHost()

Gets the remote host of user

Returns:
Remote host of user

RemoteIP

public string RemoteIP()

Gets the remote IP-address of user

Returns:
Remote IP-address of user

SendData

public void SendData(byte[] data,
                     int length,
                     long throttle)

Sends data to a session

Parameters:
data - Data
length - Length
throttle - Throttle rate