Distributing Data Using TLT30G
By Oleg Kiselyov
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! } }
Example 4: Handling a newly received packet.
Copyright © 1998, Dr. Dobb's Journal