[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: FullTCP code
> >
> > Thanks Kevin,
> > Using the current ns source fixed most of my problems. However it does
> not
> > call the tcl 'done' proc through finish() when it closes the connection.
> > done() is handled differently than the 'resume' or 'recv' tcl procs in
> the
> > tcp-full.cc code. The comments in the code mention something about
> > "registering" the proc with TCP. I have a done proc defined in my tcl
> code.
> > Is there something special I need to do to get it to be recognized by
> TCP ?
> >
> > art mena
> > USC
> >
> >
>
> Try doing something of the following form:
>
> set myagent [new Agent/TCP/FullTcp]
> $myagent proc done { } {
> ... code you want ...
> }
>
> If you want all the FullTCP's to have the same code you could
> also just do:
>
> Agent/TCP/FullTcp instproc done { } {
> ... your code ...
> }
>
> See if that helps,
> - K
>
BINGO! That nailed it.
Now I have a request, please add your code snipit to the ns docs (Chapter
21.2.4) or change the Application class to include the functionality in
done, maybe call it 'closed' or 'finished' if not done. 'done' is very
useful since it can be used to simulate a blocked TCP connection. Without
scrutinizing the code, its not immediately apparent that done is handled
differently than the others.
Thanks a bunch,
art mena
USC
Boeing