Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Gregory Ewing Newsgroups: comp.lang.python Subject: Re: Lightwight socket IO wrapper Date: Wed, 23 Sep 2015 12:47:25 +1200 Lines: 12 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net lQzSfzjcgxyhNA+7FUsvZwYdEsJ7vfsZHq9w1zQDqwDak1xnLu Cancel-Lock: sha1:HXtgsYVjcHM/i3SfRmEEYuTZtCQ= User-Agent: Mozilla Thunderbird 1.0.5 (Macintosh/20050711) X-Accept-Language: en-us, en In-Reply-To: Xref: csiph.com comp.lang.python:97013 Random832 wrote: > Isn't this technically the same problem as pressing ctrl-d at a terminal > - it's not _really_ the end of the input (you can continue reading > after), but it sends the program something it will interpret as such? Yes. There's no concept of "closing the connection" with UDP, because there's no connection. So if a read returns 0 bytes, it must be because someone sent you a 0-length datagram. -- Greg