how to know if socket is still connected

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Thu Jul 20 05:24:40 EDT 2006


In message <12blgl1t9egsqb8 at corp.supernews.com>, Grant Edwards wrote:

> If the server has closed the connection, then a recv() on the
> socket will return an empty string "", and a send() on the
> socket will raise an exception.

Would that still apply when trying to send an empty string?



More information about the Python-list mailing list