ClintHeyer.Httpd
Interface Connection

Connection is an abstracted socket-communication interface.

Property Summary
ClintHeyer.Httpd.HttpSession Session
         Gets the session for connection
long TransferRate
         Gets the last recorded transfer speed (bytes per second)

Method Summary
void Close()
         Close the connection
bool IsAlive()
         Manually checks if a connection is still alive. If not, initiates close procedure
bool IsClosed()
         Is the connection closed?
bool IsExpired()
         Checks whether connection has expired. If so, triggers closed procedures
string RemoteHostname()
         Get the remote hostname
string RemoteIP()
         Get the remote IP address
void SendData(byte[] data, int length, long throttleRate)
         Sends binary data
void SetSession(ClintHeyer.Httpd.HttpSession session)
         Sets the session for this connection
string ToBasicString()
         Gets a basic string representation of connection


Property Detail

Session

public ClintHeyer.Httpd.HttpSession Session

Gets the session for connection


TransferRate

public long TransferRate

Gets the last recorded transfer speed (bytes per second)

Method Detail

Close

public void Close()

Close the connection


IsAlive

public bool IsAlive()

Manually checks if a connection is still alive. If not, initiates close procedure

Returns:

IsClosed

public bool IsClosed()

Is the connection closed?

Returns:

IsExpired

public bool IsExpired()

Checks whether connection has expired. If so, triggers closed procedures

Returns:

RemoteHostname

public string RemoteHostname()

Get the remote hostname

Returns:
Hostname

RemoteIP

public string RemoteIP()

Get the remote IP address

Returns:

SendData

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

Sends binary data

Parameters:
data - Data
length - How much of array to send
throttleRate - Throttling rate, or less than zero for no throttling

SetSession

public void SetSession(ClintHeyer.Httpd.HttpSession session)

Sets the session for this connection

Parameters:
session - Session

ToBasicString

public string ToBasicString()

Gets a basic string representation of connection

Returns:
Basic string representation