Dr. Dobb's Journal September 1998
void Sessions::digest(SegmentInStream& packet)
{
SessionLink * sp;
if( (sp = find(packet.q_header().session_id)) != 0 )
sp->ingest(packet);
else
{
sp = new SessionLink(sh_command,packet);
sp->next = sessions; // that won't be run if an exception was
sessions = sp; // thrown from the constructor... good!
}
}