45.3.1.0.2 Session Helper

Each active source in a session requires a ``session helper''. The session helper in ns is realised through a replicator. This session helper is created when the user issues a []create-session to identify the source agent. The simulator itself keeps a reference to the session helper in its instance variable array, session_, indexed by the source and destination address of the source.

Note that the destination of source agent must be set before calling []create-session.

SessionSim instproc create-session { node agent } {
    $self instvar session_

    set nid [$node id]
    set dst [$agent set dst_]
    set session_($nid:$dst) [new Classifier/Replicator/Demuxer]
    $agent target $session_($nid:$dst) # attach the replicator to the source;
    return $session_($nid:$dst) # keep the replicator in the SessionSim instance variable array {\tt session\_};
}



Tom Henderson 2011-11-05