New submission from Mads Kiilerich <m...@kiilerich.com>:

http://docs.python.org/library/socket.html says about socket.send:
"Applications are responsible for checking that all data has been sent;
if only some of the data was transmitted, the application needs to
attempt delivery of the remaining data."

And about socket.sendall:
"Unlike send(), this method continues to send data from string until
either all data has been sent or an error occurs."

However, the examples on the same page uses plain conn.send(data)
without checking anything. That is misleading.

A solution could be to use conn.sendall(data) instead.

----------
assignee: georg.brandl
components: Documentation
messages: 87633
nosy: georg.brandl, kiilerix
severity: normal
status: open
title: Bug in socket example
type: behavior
versions: Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6005>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to