protected void CheckLifetime() {
bool okay = !m_ConnectionIsDoomed;
if (okay) {
// Returns whether or not this object's lifetime has had expired.
// True means the object is still good, false if it has timed out.
// obtain current time
DateTime utcNow = DateTime.UtcNow;
// obtain timespan
TimeSpan timeSpan = utcNow.Subtract(m_CreateTime);
// compare timeSpan with lifetime, if equal or less,
// designate this object to be killed
m_ConnectionIsDoomed = (0 < TimeSpan.Compare(m_Lifetime, timeSpan));
}
}