Close a socket externally

Jeff Shannon jeff at ccvcorp.com
Fri Oct 1 21:22:31 EDT 2004


drs wrote:

>To explain, I am working on an agent based modeling project where agents
>communicate and exchange over TCP sockets.  Agents have to "buy" the right
>to open sockets, so I need an enforcement mechanism to shut them down when
>their time expires.
>

Would it work to limit the number of bytes that they're allowed to 
send/receive, instead of time?  Especially given that TCP's delivery 
guarantees mean that the transfer times for a given chunk of data can't 
really be predicted (because it may include any number of 
retransmissions), it seems that byte-count might be a more "fair" way of 
allocating communication.  Of course, this depends on how much control 
you have over the specifications...

Jeff Shannon
Technician/Programmer
Credit International




More information about the Python-list mailing list