newbie question

Richard Brodie R.Brodie at rl.ac.uk
Fri Apr 16 06:26:30 EDT 2004


"jeff" <plastic"no-spam-pls"@xsintrk.net> wrote in message
news:Xns94CCAEBD1A18Eplasticnospamplsxsin at 216.77.188.18...

> i only want the socket to close if the word 'kill' has been sent.

You are missing Krzysztof's point. Even if the string 'kill' is sent,
TCP does not guarantee that is what you will receive. It is a pure
stream system and has no concept of records or lines; that isn't likely
the problem here but sooner or later, you *will* get burnt if you start
thinking that if 4 characters are sent, then 4 will be received.






More information about the Python-list mailing list