[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] Resetting a TCP connection



There is a otcl callback for all tcp agents for this purpose. See
TcpAgent::finish() in tcp.cc, for example. 

To use this, assume your tcp source is $tcp:

$tcp instproc done {} "whatever tcl script you like"

Then that tcp script will be called when transmission is complete. Note if
use quote for that tcl script if you want parameter substitution,
otherwise use {}; in this respect it's the same as bind in tk.

See tcl/ex/many_tcp.tcl for example of using this.

On Wed, 19 Apr 2000, Wael Noureddine wrote:

> Hello all,
> 
> I would like to close a TCP connection when its done and clear its state
> to start a fresh connection. Is that possible? agent_->close() within an
> application doesn't seem to do that. In addition I would like to find a
> way to notify the application that a file was sent (idle()-resume() 
> doen't seen to work either);
> Thanks,
> 
> Wael
> 
>